Klasse ObjectShortImmutablePair<T>

java.lang.Object
speiger.src.collections.objects.misc.pairs.impl.ObjectShortImmutablePair<T>
Typparameter:
T - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
ObjectShortPair<T>

public class ObjectShortImmutablePair<T> extends Object implements ObjectShortPair<T>
Mutable Pair Implementation that
  • Konstruktordetails

    • ObjectShortImmutablePair

      public ObjectShortImmutablePair()
      Default Constructor
    • ObjectShortImmutablePair

      public ObjectShortImmutablePair(T key, short value)
      Key/Value Constructur
      Parameter:
      key - the key of the Pair
      value - the value of the Pair
  • Methodendetails

    • setKey

      public ObjectShortPair<T> setKey(T key)
      Beschreibung aus Schnittstelle kopiert: ObjectShortPair
      Sets the Key of the Pair.
      Angegeben von:
      setKey in Schnittstelle ObjectShortPair<T>
      Parameter:
      key - the key that should be set.
      Gibt zurück:
      self or a new Pair instance with the new key.
    • getKey

      public T getKey()
      Angegeben von:
      getKey in Schnittstelle ObjectShortPair<T>
      Gibt zurück:
      the Key of the Pair
    • setShortValue

      public ObjectShortPair<T> setShortValue(short value)
      Beschreibung aus Schnittstelle kopiert: ObjectShortPair
      Sets the Value of the Pair.
      Angegeben von:
      setShortValue in Schnittstelle ObjectShortPair<T>
      Parameter:
      value - the value that should be set.
      Gibt zurück:
      self or a new Pair instance with the new value.
    • getShortValue

      public short getShortValue()
      Angegeben von:
      getShortValue in Schnittstelle ObjectShortPair<T>
      Gibt zurück:
      the Value of the Pair
    • set

      public ObjectShortPair<T> set(T key, short value)
      Beschreibung aus Schnittstelle kopiert: ObjectShortPair
      Sets key and value of the Pair
      Angegeben von:
      set in Schnittstelle ObjectShortPair<T>
      Parameter:
      key - the key that should be set.
      value - the value that should be set.
      Gibt zurück:
      self or a new Pair instance with the new key and value.
    • shallowCopy

      public ObjectShortPair<T> shallowCopy()
      Beschreibung aus Schnittstelle kopiert: ObjectShortPair
      Clones the Pair if it is mutable.
      Angegeben von:
      shallowCopy in Schnittstelle ObjectShortPair<T>
      Gibt zurück:
      a New Mutable Instance if it is mutable
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object