This section contains a summary of the classes in
the Generic Collection Library for Java, organized by category.
Packages
com.objectspace.jgl |
Contains the interfaces, collection classes, and container iterators. |
com.objectspace.jgl.adapters |
Contains the Java native array adapters. |
com.objectspace.jgl.algorithms |
Contains all the JGL algorithms. |
com.objectspace.jgl.functions |
Contains function objects that can be used to modify algorithms. |
com.objectspace.jgl.predicates |
Contains predicate classes used to affect element ordering. |
com.objectspace.jgl.util |
Contains utility classes and special iterators. |
com.objectspace.jgl.voyager |
Contains a version of the collection classes that can be used with ObjectSpace Voyager in a distributed fashion. |
com.objectspace.jgl.voyager.algorithms |
Contains distributed algorithms to be used with ObjectSpace Voyager. |
Containers
Related Interfaces
ArrayAdapter |
The abstract class implemented by all JGL array adapters. |
Container |
The interface implemented by all JGL containers. |
Sequence |
The interface implemented by all sequential JGL containers. |
Set |
The interface implemented by all JGL sets. |
Sequences
Array |
Linear, contiguous storage, fast inserts at the end only. |
Deque |
Linear, non-contiguous storage, fast inserts at extremities. |
DList |
Doubly linked list, fast inserts anywhere. |
SList |
Singly linked list, fast inserts at either extremity. |
Maps
HashMap |
1-to-1, 1-to-many mappings, stored using hash. |
OrderedMap |
1-to-1, 1-to-many mappings, stored in order. |
Sets
HashSet |
Fast object lookup, stores objects using hash. |
OrderedSet |
Fast object lookup, stores objects in order. |
Queues and Stacks
PriorityQueue |
Pops items in a sorted order. |
Queue |
Strict first-in, first-out data structure. |
Stack |
Strict first-in, last-out data structure. |
Array Adapters
BooleanArray |
Allows a native array of booleans to act like a Container. |
ByteArray |
Allows a native array of bytes to act like a Container. |
CharArray |
Allows a native array of chars to act like a Container. |
DoubleArray |
Allows a native array of doubles to act like a Container. |
FloatArray |
Allows a native array of floats to act like a Container. |
IntArray |
Allows a native array of ints to act like a Container. |
LongArray |
Allows a native array of longs to act like a Container. |
ObjectArray |
Allows a native array of Objects to act like a Container. |
ShortArray |
Allows a native array of shorts to act like a Container. |
VectorArray |
Allows a JDK Vector to act like a Container. |
Exceptions
InvalidOperationException
Inappropriate operation on a JGL container.
Applying
Applies a function to every element of a sequence.
Comparing
Mismatches, equality tests, lexicographical comparison.
Copying
Copies a sequence.
Counting
Counts unconditionally and conditionally.
Filling
Fills a sequence with a single element.
Filtering
Filters a sequence.
Finding
Finds an object or an element that satisfies a predicate.
Heap
Makes, pushes, pops, and sorts a heap.
MinMax
Finds the min and max of a sequence.
Permuting
Cycles through permutations of a sequence.
Printing
Prints sequences and containers.
Removing
Removes an object or an element that satisfies a predicate.
Replacing
Replaces an object or an element that satisfies a predicate.
Reversing
Reverses a sequence.
Rotating
Rotates a sequence.
SetOperations
Union, intersection, difference, and inclusion.
Shuffling
Shuffles a sequence.
Sorting
Sorts a sequence.
Swapping
Swaps elements or sequences.
Transforming
Maps one sequence to another.
Function Objects
Related Interfaces
BinaryFunction |
The interface of all binary function objects. |
BinaryPredicate |
The interface of all binary predicate objects. |
UnaryFunction |
The interface of all unary function objects. |
UnaryPredicate |
The interface of all unary predicate objects. |
Classes that implement the BinaryFunction interface
BinaryCompose |
P( Q( x ), R( x ) ) |
BinaryPredicateFunction |
P( x, y ) |
ConstantFunction |
V |
DividesNumber |
x / y |
MinusNumber |
x - y |
ModulusNumber |
x % y |
PlusNumber |
x + y |
PlusString |
x.toString() + y.toString() |
SwappedBinaryFunction |
P( y, x ) |
TimesNumber |
x * y |
Classes that implement the BinaryPredicate interface
BinaryAnd |
P( x, y ) && Q( x, y ) |
BinaryComposePredicate |
P( Q( x ), R( x ) ) |
BinaryNot |
!P( x, y ) |
BinaryOr |
P( x, y ) || Q( x, y ) |
BinaryTern |
P( x, y ) ? Q( x, y ) : R( x, y ) |
ConstantPredicate |
V |
EqualCollationKey |
x.compareTo( y ) == 0 |
EqualCollator |
collator.compare( x, y ) == 0 |
EqualNumber |
x == y |
EqualString |
x.toString().equals( y.toString() ) |
EqualTo |
x.equals( y ) |
GreaterEqualCollationKey |
collator.getCollationKey( x.toString() ) ).compare( collator.getCollationKey( y.toString() ) >= 0 |
GreaterEqualCollator |
collator.compare( x.toString(), y.toString() ) >= 0 |
GreaterEqualNumber |
x >= y |
GreaterEqualString |
x.toString().compareTo( y.toString() ) >= 0 |
GreaterCollationKey |
collator.getCollationKey( x.toString() ) ).compare( collator.getCollationKey( y.toString() ) > 0 |
GreaterCollator |
collator.compare( x.toString(), y.toString() ) > 0 |
GreaterNumber |
x > y |
GreaterString |
x.toString().compareTo( y.toString() ) > 0 |
HashComparator |
x.hashCode() < y.hashCode() |
IdenticalTo |
x == y |
LessEqualCollationKey |
collator.getCollationKey( x.toString() ) ).compare( collator.getCollationKey( y.toString() ) <= 0 |
LessEqualCollator |
collator.compare( x.toString(), y.toString() ) <= 0 |
LessEqualNumber |
x <= y |
LessEqualString |
x.toString().compareTo( y.toString() ) <= 0 |
LessCollationKey |
collator.getCollationKey( x.toString() ) ).compare( collator.getCollationKey( y.toString() ) < 0 |
LessCollator |
collator.compare( x.toString(), y.toString() ) < 0 |
LessNumber |
x < y |
LessString |
x.toString().compareTo( y.toString() ) < 0 |
LogicalAnd |
x && y |
LogicalOr |
x || y |
NotEqualCollationKey |
x.compareTo( y ) != 0 |
NotEqualCollator |
collator.compare( x, y ) != 0 |
NotEqualNumber |
x != y |
NotEqualString |
!x.toString().equals( y.toString() ) |
NotEqualTo |
!x.equals( y ) |
NotIdenticalTo |
x != y |
SwappedBinaryPredicate |
P( y, x ) |
Classes that implement the UnaryFunction interface
BindFirst |
P( V, x ) |
BindSecond |
P( x, V ) |
ConstantFunction |
V |
Hash |
x.hashCode() |
IdentityFunction |
x |
LengthString |
x.toString().length |
NegateNumber |
-x |
Print |
stream.println( x ) |
SelectFirst |
x.first |
SelectSecond |
x.second |
ToString |
x.toString() |
UnaryCompose |
P( Q( x ) ) |
UnaryPredicateFunction |
P( x ) |
Classes that implement the UnaryPredicate interface
BindFirstPredicate |
P( V, x ) |
BindSecondPredicate |
P( x, V ) |
ConstantPredicate |
V |
InstanceOf |
x instanceof C |
LogicalNot |
!x |
NegativeNumber |
x < 0 |
PositiveNumber |
x > 0 |
UnaryAnd |
P( x ) && Q( x ) |
UnaryComposePredicate |
P( Q( x ) ) |
UnaryNot |
!P( x ) |
UnaryOr |
P( x ) || Q( x ) |
UnaryTern |
P( x ) ? Q( x ) : R( x ) |
Iterators
Related Interfaces
InputIterator |
Can read one item at a time in a forward direction. |
OutputIterator |
Can write one item at a time in a forward direction. |
ForwardIterator |
Combines characteristics of input and output iterators. |
BidirectionalIterator |
Like forward, plus the ability to move backwards. |
RandomAccessIterator |
Like bidirectional, plus the ability to jump. |
Classes that implement the OutputIterator interface
InsertIterator |
Writes items into a container. |
ObjectOutputStreamIterator |
Writes items to an ObjectOutputStream. |
OutputStreamIterator |
Writes items to an OutputStream. |
Classes that implement the ForwardIterator interface
HashMapIterator |
Iterates over a HashMap. |
HashSetIterator |
Iterates over a HashSet. |
SListIterator |
Iterates over an SList. |
Classes that implement the BidirectionalIterator interface
DListIterator |
Iterates over a DList. |
OrderedMapIterator |
Iterates over an OrderedMap. |
OrderedSetIterator |
Iterates over an OrderedSet. |
ReverseIterator |
Iterates backwards. |
Classes that implement the RandomAccessIterator interface
ArrayIterator |
Iterates over an Array. |
BooleanIterator |
Iterates over a native array of booleans. |
ByteIterator |
Iterates over a native array of bytes. |
CharIterator |
Iterates over a native array of chars. |
DequeIterator |
Iterates over a Deque. |
DoubleIterator |
Iterates over a native array of doubles. |
FloatIterator |
Iterates over a native array of floats. |
IntIterator |
Iterates over a native array of ints. |
LongIterator |
Iterates over a native array of longs. |
ShortIterator |
Iterates over a native array of shorts. |
VectorIterator |
Iterates over a java.util.Vector. |
Benchmark |
Allows simple collection of benchmark information. |
ConditionalEnumeration |
Enumerates only selected elements. |
Randomizer |
Generates bounded random numbers. |