Class ValueMap.Property

All Implemented Interfaces:
Map.Entry<String,Object>
Enclosing class:
ValueMap

final class ValueMap.Property extends AbstractMapEntry<String,Object>
A map entry for a given property.
Since:
0.3
Version:
0.3
  • Field Details

    • index

      final int index
      The property index.
  • Constructor Details

    • Property

      Property(int index)
      Creates an entry for the property at the given index.
  • Method Details

    • getKey

      public String getKey()
      Returns the key corresponding to this entry.
    • getValueType

      public Class<?> getValueType()
      Returns value type as declared in the interface method signature. It may be a primitive type.
    • getValue

      public Object getValue()
      Returns the value corresponding to this entry.
    • setValue

      public Object setValue(Object value)
      Replaces the value corresponding to this entry with the specified value.
      Specified by:
      setValue in interface Map.Entry<String,Object>
      Overrides:
      setValue in class AbstractMapEntry<String,Object>
      Parameters:
      value - the new value to be stored in this entry.
      Returns:
      the previous value (may be null).
      Throws:
      ClassCastException - if the given value is not of the expected type.
      UnmodifiableMetadataException - if the property for this entry is read-only.