Package nl.basjes.collections.prefixmap
Class ASCIIPrefixMap<V extends Serializable>
java.lang.Object
nl.basjes.collections.prefixmap.StringPrefixMap<V>
nl.basjes.collections.prefixmap.ASCIIPrefixMap<V>
- Type Parameters:
V- The type of the value that is to be stored.
- All Implemented Interfaces:
Serializable,Map<String,,V> PrefixMap<V>
The ASCIIPrefixMap is an implementation of PrefixMap where the assumption is that the
stored prefixes only contain characters that are in the human readable range of the ASCII encoding.
Lookups using this one are about twice as fast as the StringPrefixMap
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.basjes.collections.prefixmap.StringPrefixMap
StringPrefixMap.KryoSerializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigureKryo(Object kryoInstance) This is used to configure the provided Kryo instance if Kryo serialization is desired.Methods inherited from class nl.basjes.collections.prefixmap.StringPrefixMap
clear, containsKey, containsPrefix, containsValue, entrySet, get, getAllMatches, getLongestMatch, getShortestMatch, keySet, put, remove, size, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface nl.basjes.collections.PrefixMap
containsPrefix, containsPrefix, get, getAllMatches, getAllMatches, getLongestMatch, getLongestMatch, getShortestMatch, getShortestMatch, isEmpty, putAll, remove
-
Constructor Details
-
ASCIIPrefixMap
public ASCIIPrefixMap(boolean caseSensitive)
-
-
Method Details
-
configureKryo
This is used to configure the provided Kryo instance if Kryo serialization is desired. The expected type here is Object because otherwise the Kryo library becomes a mandatory dependency on any project that uses Yauaa.- Parameters:
kryoInstance- The instance of com.esotericsoftware.kryo.Kryo that needs to be configured.
-