Data structures missing from the Java APIs. Includes:
- Array views - wrappers which expose an array (or pair of arrays in the case of
ArrayMapView) as aListimplementation, see:ArrayMapViewand constructor classArrayMapViewHandleArrayViewand constructor classArrayViewHandle
- Bag - unordered list with O(1) index removal performance, see:
BagMultiBag- treat a single internal array as multiple sub-lists
BiTypeList- a list containing two data element types with strongly typed access to elements in the list- Pair collections - non-unique maps, with list, sorted list, and bag implementations, see:
PairBagPairListSortedPairList
- Circular buffers - see:
CircularArrayCircularByteArray
ByteBufferArray- Combines the ability to resize aByteArrayOutputStreamwith the indexed position access of aByteBufferand the read/write methods of aDataOutputstreamSimpleByteBuffer- A container for a data array, offset, and length, with methods for adjusting the offset and length. The call must manually handle the data.FrequencyMap- for tracking and incrementing/decrementing occurrences of distinct key valuesPropertyMap- for easily loading and saving Java '.properties' files and automatically parsing boolean, int, float, hexadecimal int, String, Color, File, and Path properties.
Take a look at the unit tests in twg2.collections.util.tests package for examples of how the APIs can be used.