Package uk.gov.gchq.gaffer.data.element
Class Properties
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- uk.gov.gchq.gaffer.data.element.Properties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
- Direct Known Subclasses:
GroupedProperties
,LazyProperties
public class Properties extends HashMap<String,Object>
Properties
simply extendsHashMap
with property names (String) as keys and property value (Object) as values.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description Properties()
Properties(String name, Object property)
Properties(Map<String,Object> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Properties
clone()
void
keepOnly(Collection<String> propertiesToKeep)
Removes all properties with names that are not in the provided set.Object
put(String name, Object value)
void
remove(Collection<String> propertiesToRemove)
String
toString()
-
Methods inherited from class java.util.HashMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
-
-
-
Method Detail
-
clone
public Properties clone()
-
keepOnly
public void keepOnly(Collection<String> propertiesToKeep)
Removes all properties with names that are not in the provided set.- Parameters:
propertiesToKeep
- a set of properties to keep
-
remove
public void remove(Collection<String> propertiesToRemove)
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap<String,Object>
-
-