Module lettuce.core

Class Range.Boundary<T>

java.lang.Object
io.lettuce.core.Range.Boundary<T>
Enclosing class:
Range<T>

public static class Range.Boundary<T>
extends Object
Author:
Mark Paluch
  • Method Details

    • unbounded

      public static <T> Range.Boundary<T> unbounded()
      Creates an unbounded (infinite) boundary that marks the beginning/end of the range.
      Type Parameters:
      T - inferred type.
      Returns:
      the unbounded boundary.
    • including

      public static <T> Range.Boundary<T> including​(T value)
      Create a Range.Boundary based on the value that includes the value when comparing ranges. Greater or equals, less or equals. but not Greater or equal, less or equal to value.
      Type Parameters:
      T - value type.
      Parameters:
      value - must not be null.
      Returns:
      the Range.Boundary.
    • excluding

      public static <T> Range.Boundary<T> excluding​(T value)
      Create a Range.Boundary based on the value that excludes the value when comparing ranges. Greater or less to value but not greater or equal, less or equal.
      Type Parameters:
      T - value type.
      Parameters:
      value - must not be null.
      Returns:
      the Range.Boundary.
    • getValue

      public T getValue()
      Returns:
      the value
    • isIncluding

      public boolean isIncluding()
      Returns:
      true if the boundary includes the value.
    • isUnbounded

      public boolean isUnbounded()
      Returns:
      true if the bound is unbounded.
      Since:
      6.0
    • isBounded

      public boolean isBounded()
      Returns:
      true if the bound is unbounded.
      Since:
      6.0
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object