Class KeyValue


  • public class KeyValue
    extends java.lang.Object
    A value object encapsulating item key value regardless of whether the item has a simple or a composite key.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  KeyValue.Builder
      A builder for the KeyValue
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyValue()
      Instantiates an empty key value.
      KeyValue​(java.util.Collection<KeyAttributeValue> values)
      Instantiates a key value consisting of the provided attribute values
    • Constructor Detail

      • KeyValue

        public KeyValue()
        Instantiates an empty key value.
      • KeyValue

        public KeyValue​(java.util.Collection<KeyAttributeValue> values)
        Instantiates a key value consisting of the provided attribute values
        Parameters:
        values - attribute values for this key
    • Method Detail

      • getKeyAttributeValues

        public java.util.Collection<KeyAttributeValue> getKeyAttributeValues()
        Retrieves values this key consists of.
        Returns:
        a collection of values of all key attributes comprising this key value or an empty collection, if the item does not have a key.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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