Package gw.lang.reflect.interval
Interface IInterval<E extends Comparable<E>,ME extends IInterval<E,ME>>
- All Known Subinterfaces:
IIterableInterval<E,
S, U, ME>
- All Known Implementing Classes:
AbstractInterval
,BigDecimalInterval
,BigIntegerInterval
,ComparableInterval
,DateInterval
,IntegerInterval
,IterableInterval
,LongInterval
,NumberInterval
,SequenceableInterval
public interface IInterval<E extends Comparable<E>,ME extends IInterval<E,ME>>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
-
Method Details
-
getLeftEndpoint
E getLeftEndpoint()- Returns:
- The left endpoint of this interval where the left <= right
-
getRightEndpoint
E getRightEndpoint()- Returns:
- The right endpoint of this interval where the left <= right
-
isLeftClosed
boolean isLeftClosed()- Returns:
- True if this interval includes the left endpoint. E.g., x >= foo indicates a left-closed interval starting with and including foo. Conversely, x > foo is said to be left-open because the interface starts with, but excludes foo i.e., there is no minimum value defined in the interval, rather the interval is open with foo as the limit of minimum values.
-
isRightClosed
boolean isRightClosed()- Returns:
- True if this interval includes the right endpoint. E.g., x <= foo indicates a right-closed interval ending with and including foo. Conversely, x < foo is said to be right-open because the interface ends with, but excludes foo i.e., there is no maximum value defined in the interval, rather the interval is open with foo as the limit of maximum values.
-
contains
- Parameters:
elem
- An element to test- Returns:
- True if elem is a proper element in the set of elements defining this interval.
-
contains
- Parameters:
interval
- An interval to test for containment- Returns:
- True if interval's endpoints are proper elements in the set of elements defining this interval.
-
isReverse
boolean isReverse()- Returns:
- True if this interval iterates from the right by default e.g., if the interval is specified in reverse order: 10..1, Gosu will create a reverse intervall
-