Package overit.geocall.util
Class SensibleHashGetter
java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
overit.geocall.util.HashGetter
overit.geocall.util.SensibleHashGetter
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,Cloneable,Map<String,,Object> Getter
public class SensibleHashGetter
extends HashGetter
implements com.esotericsoftware.kryo.KryoSerializable
Utility class use to manage the sensible HashGetter
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty instance of SensibleHashGetterSensibleHashGetter(int initialCapacity) Creates an instance of SensibleHashGetter with an initial capacityCreates an instance of SensibleHashGetter from a MapCreates an instance of SensibleHashGetter with a ContentChangeListener -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static booleandifference(Object o, Object old) Returns if two objects are different or not.booleanInsensitive insertion of an objectbooleanInsensitive insertion of an objectvoidvoidputByPrefix(Map m, String prefixfilter) Puts in the HashGetter the map entries whose keys begin with the prefix passed as second parametervoidPuts in the HashGetter the map entries whose keys satisfy the regular expression passed as second parametervoidPuts in the HashGetter the map entries whose keys are present inside the array passed as second parametervoidPuts in the HashGetter the map entries whose keys are present inside the set passed as second parametervoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidSets the ContentChangeListenervoidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class overit.geocall.util.HashGetter
containsKey, get, get, getboolean, getBoolean, getDate, getdouble, getDouble, getfloat, getFloat, getint, getInteger, getlong, getLong, getString, global, keyIterator, put, putByPrefix, setMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
ccl
-
-
Constructor Details
-
SensibleHashGetter
public SensibleHashGetter()Creates an empty instance of SensibleHashGetter -
SensibleHashGetter
Creates an instance of SensibleHashGetter with a ContentChangeListener- Parameters:
ccl- The ContentChangeListener
-
SensibleHashGetter
public SensibleHashGetter(int initialCapacity) Creates an instance of SensibleHashGetter with an initial capacity- Parameters:
initialCapacity- The initial capacity
-
SensibleHashGetter
Creates an instance of SensibleHashGetter from a Map- Parameters:
hg- The map
-
-
Method Details
-
difference
Returns if two objects are different or not.- Parameters:
o- The object to compareold- The object to compare- Returns:
trueif there is difference between the two object,falseotherwise
-
setContentChangeListener
Sets the ContentChangeListener- Parameters:
ccl- The ContentChangeListener
-
numbPut
Insensitive insertion of an object- Parameters:
key- Of the objectvalue- Of the object- Returns:
trueif the object is added correctly,falseotherwise
-
numbPut
Insensitive insertion of an object- Parameters:
key- Of the objectvalue- Of the objectnullAsNotContained- Boolean value that indicates null as not contained- Returns:
trueif the object is added correctly,falseotherwise
-
put
-
clear
public void clear() -
remove
-
putAll
-
putByPrefix
Puts in the HashGetter the map entries whose keys begin with the prefix passed as second parameter- Parameters:
m- Te initial mapprefixfilter- The prefix used to filter the map entries
-
putByRE
Description copied from class:HashGetterPuts in the HashGetter the map entries whose keys satisfy the regular expression passed as second parameter- Overrides:
putByREin classHashGetter- Parameters:
m- The initial mapregex- The regular expression used to filter the map entries
-
putOnly
Description copied from class:HashGetterPuts in the HashGetter the map entries whose keys are present inside the array passed as second parameter- Overrides:
putOnlyin classHashGetter- Parameters:
m- The initial mapss- The string array of keys used to filter the map entries
-
putOnly
Description copied from class:HashGetterPuts in the HashGetter the map entries whose keys are present inside the set passed as second parameter- Overrides:
putOnlyin classHashGetter- Parameters:
m- The initial maps- The set used to filter the map entries
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-