Class KeyedValuesItemKey

  • All Implemented Interfaces:
    java.io.Serializable, ItemKey

    public class KeyedValuesItemKey
    extends java.lang.Object
    implements ItemKey, java.io.Serializable
    A key that references one item in a KeyedValues data structure.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Comparable<?> key
      The key for the item.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyedValuesItemKey​(java.lang.Comparable<?> key)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Tests this instance for equality with an arbitrary object.
      java.lang.Comparable<?> getKey()
      Returns the key.
      java.lang.String toJSONString()
      Returns a JSON formatted string representing the key.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • key

        java.lang.Comparable<?> key
        The key for the item.
    • Constructor Detail

      • KeyedValuesItemKey

        public KeyedValuesItemKey​(java.lang.Comparable<?> key)
        Creates a new instance.
        Parameters:
        key - the key (null not permitted).
    • Method Detail

      • getKey

        public java.lang.Comparable<?> getKey()
        Returns the key.
        Returns:
        The key (never null).
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this instance for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null not permitted).
        Returns:
        A boolean.
      • toJSONString

        public java.lang.String toJSONString()
        Description copied from interface: ItemKey
        Returns a JSON formatted string representing the key.
        Specified by:
        toJSONString in interface ItemKey
        Returns:
        A JSON formatted string.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object