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:
get
in interfaceStringToLongBiMap
-
get
- Specified by:
get
in interfaceStringToLongBiMap
- Throws:
IllegalArgumentException
-
size
public long size()- Specified by:
size
in interfaceStringToLongBiMap
-
symbols
Description copied from interface:StringToLongBiMap
Symbols, ordered by their Long ID.- Specified by:
symbols
in interfaceStringToLongBiMap
-
builder
-