Garbage-free, single-threaded data-structures (maps, lists and sets) optimized for speed.
- Designed to avoid garbage during normal use by reusing iterators, entries and internal storage.
- Built for fast, single-threaded code. The data structures are not thread-safe and must not be accessed concurrently.
- Null keys, values and elements are not accepted.
- Primitive-specialized collections avoid boxing for
byte,char,intandlongkeys or elements. - Familiar operations cover adding, finding, removing, clearing and iterating over data.
- All data structures provide
equals(),hashCode()andtoString()implementations. - Capacities and load factors can be configured for collections that use hash tables or resizable storage.
Map— A general-purpose hash map that compares keys withequals()andhashCode().LinkedMap— A hash map that iterates over entries in insertion order.CharMap— A fixed-size map with constant-time access for ASCIIcharkeys.ByteMap— A fixed-size map with constant-time access across the full range ofbytekeys.IntMap— A hash map with primitiveintkeys, avoiding key boxing.LongMap— A hash map with primitivelongkeys, avoiding key boxing.ByteBufferMap— A hash map for variable-lengthByteBufferor byte-array keys up to a configured maximum length.CharSequenceMap— A hash map for variable-lengthCharSequencekeys up to a configured maximum length.IdentityMap— A hash map that compares keys by reference identity (==) instead ofequals().
ArrayList— A resizable, array-backed list for objects with fast indexed access.ArrayLinkedList— A hybrid list that fills a fixed-size array first and uses a linked list for overflow.IntArrayList— A resizable, array-backed list for primitiveintvalues.LongArrayList— A resizable, array-backed list for primitivelongvalues.LinkedList— A garbage-free doubly linked list for objects.IntLinkedList— A garbage-free doubly linked list for primitiveintvalues.LongLinkedList— A garbage-free doubly linked list for primitivelongvalues.
Set— A hash-based collection of unique objects compared withequals()andhashCode().LinkedSet— A set that keeps unique objects in insertion order.IntSet— A hash-based set for unique primitiveintvalues.LongSet— A hash-based set for unique primitivelongvalues.IdentitySet— A set that compares objects by reference identity (==) instead ofequals().