Class BitFieldSubCommands.Offset

java.lang.Object
org.springframework.data.redis.connection.BitFieldSubCommands.Offset
Enclosing class:
BitFieldSubCommands

public static class BitFieldSubCommands.Offset extends Object
Offset used inside a BitFieldSubCommands.BitFieldSubCommand. Can be zero or type based. See Bits and positional offsets in the Redis reference.
Since:
2.1
Author:
Christoph Strobl, Mark Paluch
  • Method Details

    • offset

      public static BitFieldSubCommands.Offset offset(long offset)
      Creates new zero based offset.
      NOTE: change to type based offset by calling multipliedByTypeLength().
      Parameters:
      offset - must not be null.
      Returns:
    • multipliedByTypeLength

      public BitFieldSubCommands.Offset multipliedByTypeLength()
      Creates new type based offset.
      Returns:
    • isZeroBased

      public boolean isZeroBased()
      Returns:
      true if offset starts at 0 and is not multiplied by the type length.
    • getValue

      public long getValue()
      Returns:
      the actual offset value
    • asString

      public String asString()
      Returns:
      the Redis Command representation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object