Package com.macrofocus.common.interval
Interface Interval
- All Known Subinterfaces:
BoundedInterval,MutableBoundedInterval,MutableInterval
- All Known Implementing Classes:
AbstractBoundedInterval,AbstractMutableInterval,ClosedInterval,OpenInterval,PropertyClosedInterval,SimpleBoundedInterval,SimpleClosedInterval,TransformBoundedInterval
public interface Interval
/** This interface represents the current state of an interval.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntervalListener(IntervalListener listener) voidaddWeakIntervalListener(IntervalListener listener) booleancontains(double value) Tests if this interval contains the specified valuebooleancontainsInterval(Interval interval) Tests if this interval contains the specified intervalbooleancontainsStartEnd(double start, double end) Tests if this interval contains the specified intervaldoublegetEnd()doubledoublegetStart()booleanTests whether the starting and ending values are the samebooleanbooleanoverlaps(double start, double end) Tests if this interval overlaps the specified interval.booleanoverlapsInterval(Interval interval) Tests if this interval overlaps the specified interval.voidremoveIntervalListener(IntervalListener listener) void
-
Method Details
-
getStartProperty
-
getEndProperty
-
getStart
@JsMethod double getStart() -
getEnd
@JsMethod double getEnd() -
getExtent
@JsMethod double getExtent() -
contains
boolean contains(double value) Tests if this interval contains the specified value- Parameters:
value- the value to test- Returns:
- true if the interval contains the value, false otherwise
-
containsStartEnd
boolean containsStartEnd(double start, double end) Tests if this interval contains the specified interval- Parameters:
start- the value to testend- the value to test- Returns:
- true if the interval contains the value, false otherwise
-
containsInterval
Tests if this interval contains the specified interval- Parameters:
interval- the interval to test- Returns:
- true if the interval contains the value, false otherwise
-
overlaps
boolean overlaps(double start, double end) Tests if this interval overlaps the specified interval.- Parameters:
start- the interval to testend- the interval to test- Returns:
- true if this interval overlaps the specified interval, false otherwise
-
overlapsInterval
Tests if this interval overlaps the specified interval.- Parameters:
interval- the interval to test- Returns:
- true if this interval overlaps the specified interval, false otherwise
-
isDegenerate
boolean isDegenerate()Tests whether the starting and ending values are the same- Returns:
- true if start and end values are identical, false otherwise
-
isInverted
boolean isInverted() -
addIntervalListener
-
addWeakIntervalListener
-
removeIntervalListener
-
removeIntervalListeners
void removeIntervalListeners()
-