Package com.macrofocus.interval
Interface Interval
-
- All Known Subinterfaces:
BoundedInterval,MutableBoundedInterval,MutableInterval
- All Known Implementing Classes:
AbstractBoundedInterval,AbstractMutableInterval,ClosedInterval,OpenInterval,PropertyClosedInterval,SimpleBoundedInterval,SimpleClosedInterval
public interface Interval/** This interface represents the current state of an interval.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddIntervalListener(IntervalListener listener)voidaddWeakIntervalListener(IntervalListener listener)booleancontains(double value)Tests if this interval contains the specified valuebooleancontains(double start, double end)Tests if this interval contains the specified intervalbooleancontains(Interval interval)Tests if this interval contains the specified intervaldoublegetEnd()Property<java.lang.Double>getEndProperty()doublegetExtent()doublegetStart()Property<java.lang.Double>getStartProperty()booleanisDegenerate()Tests whether the starting and ending values are the samebooleanisInverted()booleanoverlaps(double start, double end)Tests if this interval overlaps the specified interval.booleanoverlaps(Interval interval)Tests if this interval overlaps the specified interval.voidremoveIntervalListener(IntervalListener listener)voidremoveIntervalListeners()
-
-
-
Method Detail
-
getStartProperty
Property<java.lang.Double> getStartProperty()
-
getEndProperty
Property<java.lang.Double> 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
-
contains
boolean contains(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
-
contains
boolean contains(Interval interval)
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
-
overlaps
boolean overlaps(Interval interval)
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
void addIntervalListener(IntervalListener listener)
-
addWeakIntervalListener
void addWeakIntervalListener(IntervalListener listener)
-
removeIntervalListener
void removeIntervalListener(IntervalListener listener)
-
removeIntervalListeners
void removeIntervalListeners()
-
-