Java org.apache.commons.lang3 Range fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang3 Range fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang3 Range.

The text is from its open source code.

Method

Rangebetween(final T fromInclusive, final T toInclusive)

Obtains a range with the specified minimum and maximum values (both inclusive).

The range uses the natural ordering of the elements to determine where values lie in the range.

The arguments may be passed in the order (min,max) or (max,min).

Rangebetween(final T fromInclusive, final T toInclusive, final Comparator comparator)

Obtains a range with the specified minimum and maximum values (both inclusive).

The range uses the specified Comparator to determine where values lie in the range.

The arguments may be passed in the order (min,max) or (max,min).

booleancontains(final T element)

Checks whether the specified element occurs within this range.

booleancontainsRange(final Range otherRange)

Checks whether this range contains all the elements of the specified range.

This method may fail if the ranges have two different comparators or element types.

booleanequals(final Object obj)

Compares this range to another object to test if they are equal.

.
TgetMaximum()

Gets the maximum value in this range.

TgetMinimum()

Gets the minimum value in this range.

Rangeis(final T element)

Obtains a range using the specified element as both the minimum and maximum in this range.

The range uses the natural ordering of the elements to determine where values lie in the range.

booleanisAfter(final T element)

Checks whether this range is after the specified element.

booleanisBefore(final T element)

Checks whether this range is before the specified element.

booleanisOverlappedBy(final Range otherRange)

Checks whether this range is overlapped by the specified range.

Two ranges overlap if there is at least one element in common.

This method may fail if the ranges have two different comparators or element types.