Package org.apache.sis.metadata
Class PropertyMap<V>
- Type Parameters:
V- the type of values in the map.
- Direct Known Subclasses:
IndexMap,InformationMap,NameMap,TypeMap,ValueMap
The base class of
Map views of metadata properties.
The map keys are fixed to the String type and will be the property names.
The map values depend on the actual PropertyMap subclasses; they may be
property values, property classes or property information.- Since:
- 0.3
- Version:
- 0.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classBase class of views of the entries contained in the map.(package private) classThe iterator over the elements contained in aPropertyMap<V>.Entriesset.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> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final PropertyAccessorThe accessor to use for accessing the property names, types or values.A view of the mappings contained in this map.(package private) final KeyNamePolicyDetermines the string representation of keys in the map. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyMap(PropertyAccessor accessor, KeyNamePolicy keyPolicy) Creates a new map backed by the given accessor. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) Returnstrueif this map contains a mapping for the specified key.entrySet()Returns a view of the mappings contained in this map.iterator()Returns an iterator over the entries in this map.intsize()Returns the number of elements in this map.Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
accessor
The accessor to use for accessing the property names, types or values. -
keyPolicy
Determines the string representation of keys in the map. -
entrySet
A view of the mappings contained in this map.
-
-
Constructor Details
-
PropertyMap
PropertyMap(PropertyAccessor accessor, KeyNamePolicy keyPolicy) Creates a new map backed by the given accessor.
-
-
Method Details
-
size
public int size()Returns the number of elements in this map. The default implementation returnsPropertyAccessor.count(), which is okay only if all metadata defined by the standard are included in the map. Subclasses shall override this method if their map contain only a subset of all possible metadata elements. -
containsKey
Returnstrueif this map contains a mapping for the specified key. The default implementation is okay only if all metadata defined by the standard are included in the map. Subclasses shall override this method if their map contain only a subset of all possible metadata elements.- Specified by:
containsKeyin interfaceMap<String,V> - Overrides:
containsKeyin classAbstractMap<String,V>
-
entrySet
Returns a view of the mappings contained in this map. Subclasses shall override this method if they define a different entries set class than the defaultPropertyMap<V>.Entriesinner class. -
iterator
Returns an iterator over the entries in this map.
-