Package dev.enola.common.string2long
Class ImmutableStringToLongBiMap
java.lang.Object
dev.enola.common.string2long.ImmutableStringToLongBiMap
- All Implemented Interfaces:
StringToLongBiMap
Immutable implementation of
StringToLongBiMap.
The Builder of this class is NOT thread-safe, but the resulting built instance is (and it's
FASTER; e.g. faster than the ConcurrentStringToLongBiMap).
As currently implemented, this only actually supports up to Integer.MAX_VALUE (NOT
Long!) number of symbols. The API, however, does allow for future expansion of this
implementation to and other implementations which support more symbols.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.enola.common.string2long.StringToLongBiMap
StringToLongBiMap.Builder, StringToLongBiMap.LongOrStringConsumer -
Method Summary
-
Method Details
-
get
- Specified by:
getin interfaceStringToLongBiMap
-
get
- Specified by:
getin interfaceStringToLongBiMap- Throws:
IllegalArgumentException
-
size
- Specified by:
sizein interfaceStringToLongBiMap
-
symbols
Description copied from interface:StringToLongBiMapSymbols, ordered by their Long ID.- Specified by:
symbolsin interfaceStringToLongBiMap
-
builder
-