## Package gate.util

Interface Summary
FeatureBearer: Classes that have features.
IdBearer: Classes that have Ids.
NameBearer: Classes that have features.

Class Summary
AbstractFeatureBearer: A convenience implemetation of FeatureBearer.
AbstractNameBearer
Coordinates
CorpusBenchmarkTool
CorpusSaver
Err: Shorthand for the `System.err.print and println` methods.
ExtensionFileFilter: Implementation of a file filter This class is used by `JFileChooser` to filter the displayed files by their extension.
Files: Some utilities for use with Files and with resources.
GateClassLoader: GATE's class loader, which allows loading of classes over the net.
HashMapLong: simple cut-off version of the hashmap with native long's as keys only get,put and isEmpty methods are implemented().
HashMapLong.Entry: HashMapLong collision list entry.
HtmlLinksExtractor: This class extracts links from HTML files.
Jacl: This class provides access to the Jacl Tcl interpreter, and caters for loading any Tcl scripts that live in the GATE source.
JarFiles: This class is used to merge a set of Jar/Zip Files in a Jar File It is ignored the manifest.
Jdk: Jdk encapsulates some utilities for poking around in your Java environment.
Lax: LAX (LazyProgrammer Api for XML) layer for a SAX parser, based on Sun's JAXP layer...so it works with any JAXP compliant parser
LaxErrorHandler
NameComparator: Compares `NameBearer`s by name (string comparation)
ObjectWriter: Writes an object to an PipedOutputStream wich can be connected to a PipedInputStream.
OffsetComparator: Compares annotations by start offset
OptionsMap: A map that stores values as strings and provides support for converting some frequently used types to and from string
Out: Shorthand for the `System.out.print and println` methods.
Pair
ProgressPrinter: Class used to simulate the behaviour of a progress bar on an OutputStream.
RawEditorKit: This class provides an editor kit that does not change \n\r to \n but instead it leaves the original text as is.
RBTreeMap: Slightly modified implementation of java.util.TreeMap in order to return the closest neighbours in the case of a failed search.
RBTreeMap.Entry: Node in the Tree.
Scratch: A scratch pad for experimenting.
SimpleArraySet: A specific *partial* implementation of the Set interface used for high performance and memory reduction on small sets.
SimpleFeatureMapImpl: Simple case of features.
SimpleMapImpl: Implements Map interface in using less memory.
SimpleMapImpl.Entry: Auxiliary classes needed for the support of entrySet() method
SimpleSortedSet: The purpose of this Map is to combine the functionality found in TreeSet, especially first() and tailSet() with the hashcode driven map using native long as key to hold the annotations orederd by their offset.
Strings: Some utilities for use with Strings.
TemplateLaxErrorHandler
TestBumpyStack: BumpyStack test class.
TestFeatureMap: Title: Gate2 Description: Copyright: Copyright (c) 2000 Company: University Of Sheffield
TestFiles: Files test class.
TestJacl: Tests for the Jacl class
TestJdk: Tests for the Jdk class and for GateClassLoader.
TestRBTreeMap: Tests for the RBTreeMap class
TestTemplate: Template test class - to add a new part of the test suite: copy this class and change "Template" to the name of the new tests; add a line to TestGate.java in the suite method referencing your new class; add test methods to this class.
Tools
WeakBumpyStack: Weak stack that allow you to bump an element to the front.

Exception Summary
DocumentFormatException: This exception can be used to catch any internal exception thrown by the DocumentFormat class and its subbclasses.
GateException: A superclass for exceptions in the GATE packages.
GateRuntimeException: Exception used to signal a runtime exception within Gate.
GateSaxException: An inherited class from SAX exception in the GATE packages.
InvalidDatabaseException: Used to signal an attempt to connect to a database in an invalid format, that is a database tha does not have the right structure (see Gate2 documentation for details on required database structure).
InvalidOffsetException: Used to signal an attempt to create a node with an invalid offset.
LazyProgrammerException: What to throw in a method that hasn't been implemented yet.

LuckyException

This exception is intended to be used in places where there definitely shouldn't be any exceptions thrown but the API requires us to catch some, eg: `try{ if( a != null){ a.doSomething(); } }catch(NullPointerException npe){ throw new LuckyException("I found a null pointer!"); }` Of course the system will never require you to catch NullPOinterException as it derives from RuntimeException, but I couldn't come with a better example.

MethodNotImplementedException
NoSuchObjectException: Raised when there is an attempt to read an inexistant object from the database(i.e.
OpenTransactionsException: Used to signal an attempt to close all connections to a database while there are still connections in use by the clients of that database.