Package org.omnifaces.utils.data
Class AbstractRange<N>
- java.lang.Object
-
- org.omnifaces.utils.data.AbstractRange<N>
-
- All Implemented Interfaces:
Serializable
,Range<N>
public abstract class AbstractRange<N> extends Object implements Serializable, Range<N>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractRange()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract int
compare(N left, N right)
boolean
contains(N value)
Check if a given value is contained within this rangeboolean
equals(Object object)
int
hashCode()
boolean
intersects(Range<N> other)
Check if the given range intersects the current range.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.omnifaces.utils.data.Range
getMax, getMin, isMaxInclusive, isMinInclusive, stream, withMax, withMaxInclusive, withMin, withMinInclusive
-
-
-
-
Method Detail
-
intersects
public boolean intersects(Range<N> other)
Description copied from interface:Range
Check if the given range intersects the current range.- Specified by:
intersects
in interfaceRange<N>
- Parameters:
other
- the range to check against the current range- Returns:
true
if both ranges intersect andfalse
otherwise
-
contains
public boolean contains(N value)
Description copied from interface:Range
Check if a given value is contained within this range
-
-