java.lang.Object
org.springframework.data.redis.connection.zset.DefaultTuple
All Implemented Interfaces:
Comparable<Double>, Tuple
Direct Known Subclasses:
DefaultStringTuple

public class DefaultTuple extends Object implements Tuple
Default implementation for Tuple interface.
Author:
Costin Leau, Christoph Strobl
  • Constructor Details

    • DefaultTuple

      public DefaultTuple(byte[] value, Double score)
      Constructs a new DefaultTuple instance.
      Parameters:
      value -
      score -
  • Method Details

    • getScore

      public Double getScore()
      Specified by:
      getScore in interface Tuple
      Returns:
      the member score value used for sorting.
    • getValue

      public byte[] getValue()
      Specified by:
      getValue in interface Tuple
      Returns:
      the raw value of the member.
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Double o)
      Specified by:
      compareTo in interface Comparable<Double>
    • toString

      public String toString()
      Overrides:
      toString in class Object