org.springframework.data.domain

## Class Range.Bound<T extends Comparable<T>>

- java.lang.Object
- - org.springframework.data.domain.Range.Bound<T>

Enclosing class:
  Range<T extends Comparable<T>>

    public static final class Range.Bound<T extends Comparable<T>>
    extends Object

Value object representing a boundary. A boundary can either be `unbounded`, `including its value` or `its value`.

Since:
  2.0
Author:
  Mark Paluch

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`static Range.Bound<Double>` `exclusive(double value)` Creates a boundary excluding `value`.
`static Range.Bound<Float>` `exclusive(float value)` Creates a boundary excluding `value`.
`static Range.Bound<Integer>` `exclusive(int value)` Creates a boundary excluding `value`.
`static Range.Bound<Long>` `exclusive(long value)` Creates a boundary excluding `value`.
`static <T extends Comparable<T>> Range.Bound<T>` `exclusive(T value)` Creates a boundary excluding `value`.
`Optional<T>` `getValue()`
`int` `hashCode()`
`static Range.Bound<Double>` `inclusive(double value)` Creates a boundary including `value`.
`static Range.Bound<Float>` `inclusive(float value)` Creates a boundary including `value`.
`static Range.Bound<Integer>` `inclusive(int value)` Creates a boundary including `value`.
`static Range.Bound<Long>` `inclusive(long value)` Creates a boundary including `value`.
`static <T extends Comparable<T>> Range.Bound<T>` `inclusive(T value)` Creates a boundary including `value`.
`boolean` `isBounded()` Returns whether this boundary is bounded.
`boolean` `isInclusive()`
`String` `toString()`
`static <T extends Comparable<T>> Range.Bound<T>` `unbounded()` Creates an unbounded `Range.Bound`.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### unbounded

    public static <T extends Comparable<T>> Range.Bound<T> unbounded()

Creates an unbounded `Range.Bound`.

#### isBounded

    public boolean isBounded()

Returns whether this boundary is bounded.

Returns:

#### inclusive

    public static <T extends Comparable<T>> Range.Bound<T> inclusive(T 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 Range.Bound<Float> inclusive(float value)

Creates a boundary including `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:

#### exclusive

    public static <T extends Comparable<T>> Range.Bound<T> exclusive(T 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 Range.Bound<Float> exclusive(float value)

Creates a boundary excluding `value`.

Parameters:
  `value` - must not be null.
Returns:

#### exclusive

    public static Range.Bound<Double> exclusive(double value)

Creates a boundary excluding `value`.

Parameters:
  `value` - must not be null.
Returns:

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getValue

    public Optional<T> getValue()

#### isInclusive

    public boolean isInclusive()

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`