org.cougaar.util |
|
Java Source File Name | Type | Comment |
Arguments.java | Class | A "name=value" parser.
Note that Arguments instances are unmodifiable, like Strings.
Example use:
Arguments args = new Arguments("x=y, q=one, q=two, z=99");
String x = args.getString("x");
assert "y".equals(x);
int z = args.getInt("z", 1234);
assert z == 99;
List<String> q = args.getStrings("q");
assert q != null && q.size() == 2;
The Cougaar component model includes built-in support to invoke an optional
"setArguments" method. |
ArrayListFoundation.java | Class | A copy of java.util.ArrayList, modified so that previously
private data members are here declared protected and which does not
use iterators to walk itself p>
This allows extending classes to have efficient access to the
actual data storage elements so that the supported API extensions
have first-class access. |
ArrayMap.java | Class | An implementation of Map that maintains the elements in
the order they were added, as opposed to the random order of a
HashMap .
An ArrayMap is a Map, and can be used exactly like a typical Map. |
BackedEnumerator.java | Class | An Enumeration which is backed by an Iterator over a copy of an
original collection. |
BitSet2D.java | Class | A two dimensional set of bits. |
CallerTracker.java | Class | A set of utilities for tracking method invocations by stack. |
ChainingIterator.java | Class | An Iterator implementation which successively iterates over
a list of iterators. |
CircularQueue.java | Class | Implements a traditional circular queue, except that it will enlarge
backing array if it runs out of space.
Also implements the Collection API, except for remove methods.
This implementation leaves all synchronization to the caller.
The implementation is optimized to make add(Object) and Object next()
operations as cheap as possible. |
CollectionDelegate.java | Class | |
Collectors.java | Class | Collectors is a class of static methods for applying a Thunk
to various sorts of collection-like data structures. |
ConfigFinder.java | Class | ConfigFinder provides utilitites to search for a named file in
several specified locations, returning the first location where a
file by that name is found.
Files are found and opened by the open() method. |
Configuration.java | Class | Configuration is a holder of a collection of static configuration utility methods,
mostly for use by ConfigFinder et al. |
CSVUtility.java | Class | |
DBConnectionPool.java | Class | A database connection manager that creates pools of db connections
that can be reused to improve performance. |
DBProperties.java | Class | This utility extends java.util.Properties by doing parameter
substitutions after loading a .q file. |
DemoMetalTheme.java | Class | Extends DefaultMetalTheme to specify fonts appropriate for the demo
UI displays. |
DynamicUnaryPredicate.java | Interface | DynamicUnaryPredicate marks a UnaryPredicate as testing
for mutable features of objects. |
Empty.java | Class | Holding class for providing singleton collection-like
objects. |
EmptyEnumeration.java | Class | |
EmptyIterator.java | Class | |
Enumerator.java | Class | An Enumeration which is backed by an Iterator. |
FastString.java | Class | A string wrapper which serializes the enclosed string more
efficiently... |
FilteredEnumeration.java | Class | |
FilteredIterator.java | Class | |
Filters.java | Class | Filters is a class of static methods for filtering (subsetting) Collections. |
FutureResult.java | Class | A container that allows one thread to wait for the processing
result of a parallel thread. |
GC.java | Class | A utility for requesting a GC in various ways. |
GenericStateModel.java | Interface | GenericStateModel interface. |
GenericStateModelAdapter.java | Class | A full implementation of GenericStateModel. |
IdentityHashSet.java | Class | Hash set based upon object "==" identity. |
INIParser.java | Class | Utility for reading MSWindows-style .ini files. |
IntrospectionTest.java | Class | Class for testing Bean introspection in general and
Asset/PG introspection in particular. |
IsInstanceOf.java | Class | General purpose dynamic 'instanceof' predicate. |
KeyedSet.java | Class | KeyedSet is a custom collection which looks like a Set,
but allows redefinition of the key to use. |
LinkedByteOutputStream.java | Class | Replacement for ByteArrayOutputStream which grows a linked list
of multiple byte[]s instead of a single byte[].
The advantage of this implementation is that it grows in size
more efficiently than a single byte[]. |
LockFlag.java | Class | LockFlag class adapted from sample in "Java Threads"
-- Scott Oaks and Henry Wong. |
LRUCache.java | Class | LRUCache is a simple extension of the standard LinkedHashMap
to implement a fixed-size, access-ordered LRU Cache. |
LRUExpireMap.java | Class | An LRUExpireMap is a simple least-recently-used cache that also
expires entries based on the system time.
Entries are put in the map with an explicit expiration time. |
Mapping.java | Interface | |
Mappings.java | Class | |
MDBConfigWriter.java | Class | |
MEIWriter.java | Class | |
Memo.java | Class | A "memoization" utility - as long as the specified condition object
doesn't change, then the result doesn't change. |
MinMaxPanel.java | Class | |
MoreMath.java | Class | Additional math functions. |
MutableTimeSpan.java | Class | |
NaturalOrderComparator.java | Class | A sorting comparator to sort strings numerically,
ie [1, 2, 10], as opposed to [1, 10, 2]. |
NewTimeSpan.java | Interface | |
NonOverlappingTimeSpanSet.java | Class | A Collection which implements a set of TimeSpan elements
which are maintained sorted first by start time and then by
end time. |
NumericDocument.java | Class | |
NumericListDocument.java | Class | |
OptionPane.java | Class | This fixes bugs in JOptionPane.showOptionDialog and
JOptionPane.showInputDialog that sizes the dialog too small when
using larger demo fonts. |
Parameters.java | Class | COUGAAR Parameter String utilities. |
PipedInputStream.java | Class | An efficient replacement for java.io.PipedInputStream. |
PipedOutputStream.java | Class | |
PropertyParser.java | Class | |
PropertyTree.java | Class | A PropertyTree is an ArrayMap that limits it's keys to
String s and it's values to:
- null
- String
- wrapped Java primitive (Integer, Boolean, etc)
- another PropertyTree
- a Serializable Collection of elements, each element matching
one of the above criterion
.
An ArrayMap is a java.util.Map , and can be used exactly
like a typical Map. |
Random.java | Class | |
RarelyModifiedList.java | Class | A "double buffered" List implementation, optimized for
cases where the contents rarely change.
This implementation acts superficially like a normal list
except that it actually is implemented by always creating
a new private copy of the list on each modification.
This allows iteration and such to never have to worry about
comodification exceptions. |
ReaderInputStream.java | Class | Adapts a Reader as an InputStream . |
ReadOnlyCollection.java | Class | Wraps a Set disabling all mutator methods. |
ReadOnlySet.java | Class | Wraps a Set disabling all mutator methods. |
ReadOnlySortedSet.java | Class | Wraps a SortedSet disabling all mutator methods. |
Reflect.java | Class | Some utilities for java reflection that are more efficient and/or slightly
different functionality then the jdk equivalents. |
ReusableThread.java | Class | A Thread class which can be restarted to rerun it's (settable)
runnable object. |
ReusableThreadPool.java | Class | Provide a pool of reusable threads to reduce the overhead of
construction/destruction of large numbers of standard thread,
particularly on VM implementation which use OS-level thread
implementations. |
SelfDescribingBeanInfo.java | Class | A useful base class which allows an object to be it's own BeanInfo
class. |
ShortDateFormat.java | Class | Short form date formatter, using "month/day/year" (e.g. |
SingleElementEnumeration.java | Class | |
Sortings.java | Class | Sortings is a set of utility methods which provide simple
and/or fixed sorting functionality to JDK Collections Framework. |
Spinner.java | Class | A control with arrows to cycle through a set of values and an entry
field for direct entry of the value. |
StackElements.java | Class | Wrapper around a Throwable for stack-based equality. |
StackMachine.java | Class | |
StateMachine.java | Class | A little state machine framework to allow proper sequencing of a set
of logical states. |
StateModelException.java | Class | Thrown by GenericStateModel state transition methods when transition
is not possible, usually because the ending state cannot be reached
directly from the starting state. |
StringKey.java | Class | Wrapper around a String for use as a key in a hash table (hashMap, etc). |
Strings.java | Class | |
StringUtility.java | Class | Utility knife for efficiently parsing stuff out of strings. |
SynchronizedTimeSpanSet.java | Class | |
SyncTriggerModelImpl.java | Class | A standard TriggerModel that batches "trigger()"
requests for a single-threaded client Trigger ,
plus provides support for "suspend()/resume()" and
"start()/stop()".
Only one "clientTrigger.trigger()" will be run at a time,
so the client Trigger can be non-synchronized. |
TableMap.java | Class | |
TableSorter.java | Class | |
TestAnnotations.java | Class | |
TestArguments.java | Class | |
TestChainingIterator.java | Class | |
TestCircularQueue.java | Class | |
TestCSVUtility.java | Class | |
TestDBProperties.java | Class | |
TestMappings.java | Class | |
TestNonOverlappingTimeSpanSet.java | Class | |
TestPropertyTree.java | Class | |
TestRarelyModifiedList.java | Class | |
TestShortDateFormat.java | Class | |
TestStackMachine.java | Class | |
TestStateMachine.java | Class | |
TestStringUtility.java | Class | |
TestTimeSpanSet.java | Class | |
TestWaitQueue.java | Class | |
ThemeFactory.java | Class | ThemeFactory - Convenience class for establishing common look and feel
for the UI. |
Thunk.java | Interface | A Thunk is small piece of code to be executed repeatedly, often
gathering state for later perusal. |
TimeSpan.java | Interface | An abstraction of an object which starts at a known point
in time and ends before a known point in time.
Note that the interval is closed with respect to the
start point, open with respect to the end point and start must
be strictly less than end.
An interval where start==end is illegal, as it would indicate a
negative 1 millisecond duration. |
TimeSpans.java | Class | Collection of utility methods for manipulation and
construction of TimeSpan objects. |
TimeSpanSet.java | Class | A Collection which implements a set of TimeSpan elements
which are maintained sorted first by start time and then by
end time. |
ToStringMemo.java | Class | A hack for computing a complex object's toString as needed,
but without keeping it around for ever. |
Translations.java | Class | Translations holds a set of static methods for translating between
various representations of objects, primarily collection-like
things. |
Trigger.java | Interface | Generic callback interface. |
TriggerModel.java | Interface | An interface for a Trigger that's also a GenericStateModel.
The result of "trigger()" will depend upon the current model
state. |
TriggerRegistry.java | Interface | A simple "registry" API for triggers, which is used by
implementations of TriggerModel . |
UnaryPredicate.java | Interface | UnaryPredicate is an interface for implementing Unary testing operations. |
UtilTest.java | Class | |
WaitQueue.java | Class | Implement an asynchronous wait/notify map with value pass-through, selected by an opaque key. |