java.lang.Object
org.springframework.data.elasticsearch.core.Range<T>

@Deprecated(since="5.0", forRemoval=true) public class Range<T> extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
use {org.springframework.data.domain.Range} instead.
Simple value object to work with ranges and boundaries.
Since:
4.3
Author:
Sascha Woo
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value object representing a boundary.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Range<T>
    closed(T from, T to)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Range with inclusive bounds for both values.
    boolean
    contains(T value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns whether the Range contains the given value.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static <T> Range<T>
    just(T value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Range with the given value as sole member.
    static <T> Range<T>
    leftOpen(T from, T to)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new left-open Range, i.e. left exclusive, right inclusive.
    static <T> Range<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a left-unbounded Range (the left bound set to Range.Bound.unbounded()) with the given right bound.
    static <T> Range<T>
    of(Range.Bound<T> lowerBound, Range.Bound<T> upperBound)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Range with the given lower and upper bound.
    static <T> Range<T>
    open(T from, T to)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Range with exclusive bounds for both values.
    static <T> Range<T>
    rightOpen(T from, T to)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new right-open Range, i.e. left inclusive, right exclusive.
    static <T> Range<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a right-unbounded Range (the right bound set to Range.Bound.unbounded()) with the given left bound.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static <T> Range<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns an unbounded Range.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • closed

      public static <T> Range<T> closed(T from, T to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Range with inclusive bounds for both values.
      Type Parameters:
      T -
      Parameters:
      from - must not be null.
      to - must not be null.
      Returns:
    • just

      public static <T> Range<T> just(T value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Range with the given value as sole member.
      Type Parameters:
      T -
      Parameters:
      value - must not be null.
      Returns:
      See Also:
    • leftOpen

      public static <T> Range<T> leftOpen(T from, T to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new left-open Range, i.e. left exclusive, right inclusive.
      Type Parameters:
      T -
      Parameters:
      from - must not be null.
      to - must not be null.
      Returns:
    • leftUnbounded

      public static <T> Range<T> leftUnbounded(Range.Bound<T> to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a left-unbounded Range (the left bound set to Range.Bound.unbounded()) with the given right bound.
      Type Parameters:
      T -
      Parameters:
      to - the right Range.Bound, must not be null.
      Returns:
    • of

      public static <T> Range<T> of(Range.Bound<T> lowerBound, Range.Bound<T> upperBound)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Range with the given lower and upper bound.
      Parameters:
      lowerBound - must not be null.
      upperBound - must not be null.
    • open

      public static <T> Range<T> open(T from, T to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Range with exclusive bounds for both values.
      Type Parameters:
      T -
      Parameters:
      from - must not be null.
      to - must not be null.
      Returns:
    • rightOpen

      public static <T> Range<T> rightOpen(T from, T to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new right-open Range, i.e. left inclusive, right exclusive.
      Type Parameters:
      T -
      Parameters:
      from - must not be null.
      to - must not be null.
      Returns:
    • rightUnbounded

      public static <T> Range<T> rightUnbounded(Range.Bound<T> from)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a right-unbounded Range (the right bound set to Range.Bound.unbounded()) with the given left bound.
      Type Parameters:
      T -
      Parameters:
      from - the left Range.Bound, must not be null.
      Returns:
    • unbounded

      public static <T> Range<T> unbounded()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns an unbounded Range.
      Returns:
    • contains

      public boolean contains(T value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns whether the Range contains the given value.
      Parameters:
      value - must not be null.
      Returns:
    • equals

      public boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • getLowerBound

      public Range.Bound<T> getLowerBound()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getUpperBound

      public Range.Bound<T> getUpperBound()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object