Package org.apache.ofbiz.base.lang
Interface Range<T>
-
- All Known Implementing Classes:
ComparableRange
,DateRange
public interface Range<T>
A range of values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
after(Range<T> range)
Returnstrue
if the lowest value in this range occurs after the greatest value inrange
.boolean
after(T value)
Returnstrue
if this range occurs aftervalue
.boolean
before(Range<T> range)
Returnstrue
if the greatest value in this range occurs before the lowest value inrange
.boolean
before(T value)
Returnstrue
if this range occurs beforevalue
.T
end()
Returns the ending value of this range.boolean
includes(Range<T> range)
Returnstrue
if this range includesrange
.boolean
includes(T value)
Returnstrue
ifvalue
occurs within this range.boolean
isPoint()
Returnstrue
if the starting and ending values are equal.boolean
overlaps(Range<T> range)
Returnstrue
if this range overlapsrange
.T
start()
Returns the starting value of this range.
-
-
-
Method Detail
-
after
boolean after(Range<T> range)
Returnstrue
if the lowest value in this range occurs after the greatest value inrange
.- Parameters:
range
- The range to test- Returns:
true
if the lowest value in this range occurs after the greatest value inrange
-
after
boolean after(T value)
Returnstrue
if this range occurs aftervalue
.- Parameters:
value
- The value to test- Returns:
true
if this range occurs aftervalue
-
before
boolean before(Range<T> range)
Returnstrue
if the greatest value in this range occurs before the lowest value inrange
.- Parameters:
range
- The range to test- Returns:
true
if the greatest value in this range occurs before the lowest value inrange
-
before
boolean before(T value)
Returnstrue
if this range occurs beforevalue
.- Parameters:
value
- The value to test- Returns:
true
if this range occurs beforevalue
-
end
T end()
Returns the ending value of this range.- Returns:
- Ending value
-
includes
boolean includes(Range<T> range)
Returnstrue
if this range includesrange
.- Parameters:
range
- The range to test- Returns:
true
if this range includesrange
-
includes
boolean includes(T value)
Returnstrue
ifvalue
occurs within this range.- Parameters:
value
- The value to test- Returns:
true
ifvalue
occurs within this range
-
isPoint
boolean isPoint()
Returnstrue
if the starting and ending values are equal.- Returns:
true
if the starting and ending values are equal
-
overlaps
boolean overlaps(Range<T> range)
Returnstrue
if this range overlapsrange
.- Parameters:
range
- The range to test- Returns:
true
if this range overlapsrange
-
start
T start()
Returns the starting value of this range.- Returns:
- Starting value
-
-