Class PropertyMap<V>

java.lang.Object
java.util.AbstractMap<String,V>
org.apache.sis.metadata.PropertyMap<V>
Type Parameters:
V - the type of values in the map.
All Implemented Interfaces:
Map<String,V>
Direct Known Subclasses:
IndexMap, InformationMap, NameMap, TypeMap, ValueMap

abstract class PropertyMap<V> extends AbstractMap<String,V>
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:
  • Field Details

    • accessor

      final PropertyAccessor accessor
      The accessor to use for accessing the property names, types or values.
    • keyPolicy

      final KeyNamePolicy keyPolicy
      Determines the string representation of keys in the map.
    • entrySet

      transient Set<Map.Entry<String,V>> entrySet
      A view of the mappings contained in this map.
  • Constructor Details

  • Method Details

    • size

      public int size()
      Returns the number of elements in this map. The default implementation returns PropertyAccessor.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.
      Specified by:
      size in interface Map<String,V>
      Overrides:
      size in class AbstractMap<String,V>
    • containsKey

      public boolean containsKey(Object key)
      Returns true 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 interface Map<String,V>
      Overrides:
      containsKey in class AbstractMap<String,V>
    • entrySet

      public Set<Map.Entry<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 default PropertyMap<V>.Entries inner class.
      Specified by:
      entrySet in interface Map<String,V>
      Specified by:
      entrySet in class AbstractMap<String,V>
    • iterator

      abstract Iterator<Map.Entry<String,V>> iterator()
      Returns an iterator over the entries in this map.