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 void
addIntervalListener(IntervalListener listener)
void
addWeakIntervalListener(IntervalListener listener)
boolean
contains(double value)
Tests if this interval contains the specified valueboolean
contains(double start, double end)
Tests if this interval contains the specified intervalboolean
contains(Interval interval)
Tests if this interval contains the specified intervaldouble
getEnd()
Property<java.lang.Double>
getEndProperty()
double
getExtent()
double
getStart()
Property<java.lang.Double>
getStartProperty()
boolean
isDegenerate()
Tests whether the starting and ending values are the sameboolean
isInverted()
boolean
overlaps(double start, double end)
Tests if this interval overlaps the specified interval.boolean
overlaps(Interval interval)
Tests if this interval overlaps the specified interval.void
removeIntervalListener(IntervalListener listener)
void
removeIntervalListeners()
-
-
-
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()
-
-