Class Range.Bound<T>

java.lang.Object
org.springframework.data.elasticsearch.core.Range.Bound<T>
Enclosing class:
Range<T>

public static final class Range.Bound<T> extends Object
Value object representing a boundary. A boundary can either be unbounded, inclusive(Object) including its value} or exclusive(Object) its value}.
  • Method Details

    • exclusive

      public static Range.Bound<Double> exclusive(double value)
      Creates a boundary excluding value.
      Parameters:
      value - must not be null.
      Returns:
    • exclusive

      public static Range.Bound<Float> exclusive(float value)
      Creates a boundary excluding value.
      Parameters:
      value - must not be null.
      Returns:
    • exclusive

      public static Range.Bound<Integer> exclusive(int value)
      Creates a boundary excluding value.
      Parameters:
      value - must not be null.
      Returns:
    • exclusive

      public static Range.Bound<Long> exclusive(long value)
      Creates a boundary excluding value.
      Parameters:
      value - must not be null.
      Returns:
    • exclusive

      public static <T> Range.Bound<T> exclusive(T value)
      Creates a boundary excluding value.
      Parameters:
      value - must not be null.
      Returns:
    • inclusive

      public static Range.Bound<Double> inclusive(double value)
      Creates a boundary including value.
      Parameters:
      value - must not be null.
      Returns:
    • inclusive

      public static Range.Bound<Float> inclusive(float value)
      Creates a boundary including value.
      Parameters:
      value - must not be null.
      Returns:
    • inclusive

      public static Range.Bound<Integer> inclusive(int value)
      Creates a boundary including value.
      Parameters:
      value - must not be null.
      Returns:
    • inclusive

      public static Range.Bound<Long> inclusive(long value)
      Creates a boundary including value.
      Parameters:
      value - must not be null.
      Returns:
    • inclusive

      public static <T> Range.Bound<T> inclusive(T value)
      Creates a boundary including value.
      Parameters:
      value - must not be null.
      Returns:
    • unbounded

      public static <T> Range.Bound<T> unbounded()
      Creates an unbounded Range.Bound.
    • equals

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

      public Optional<T> getValue()
    • hashCode

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

      public boolean isBounded()
      Returns whether this boundary is bounded.
      Returns:
    • isInclusive

      public boolean isInclusive()
    • toString

      public String toString()
      Overrides:
      toString in class Object