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) class
Base class of views of the entries contained in the map.(package private) class
The iterator over the elements contained in aPropertyMap<V>.Entries
set.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final PropertyAccessor
The accessor to use for accessing the property names, types or values.A view of the mappings contained in this map.(package private) final KeyNamePolicy
Determines 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 TypeMethodDescriptionboolean
containsKey
(Object key) Returnstrue
if 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.int
size()
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, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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
Returnstrue
if 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:
containsKey
in interfaceMap<String,
V> - Overrides:
containsKey
in 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>.Entries
inner class. -
iterator
Returns an iterator over the entries in this map.
-