Package com.macrofocus.interval
Class SimpleBoundedInterval
- java.lang.Object
-
- com.macrofocus.interval.AbstractMutableInterval
-
- com.macrofocus.interval.AbstractBoundedInterval
-
- com.macrofocus.interval.SimpleBoundedInterval
-
- All Implemented Interfaces:
BoundedInterval
,Interval
,MutableBoundedInterval
,MutableInterval
public class SimpleBoundedInterval extends AbstractBoundedInterval implements MutableBoundedInterval
/** Default data model for bounded interval.
-
-
Constructor Summary
Constructors Constructor Description SimpleBoundedInterval(double start, double extent)
SimpleBoundedInterval(double start, double minimum, double maximum)
SimpleBoundedInterval(double start, double extent, double minimum, double maximum)
SimpleBoundedInterval(MutableInterval interval, double minimum, double maximum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
MutableProperty<java.lang.Double>
getEndProperty()
double
getExtent()
double
getMaximum()
double
getMaximumExtent()
double
getMinimum()
double
getMinimumExtent()
double
getStart()
MutableProperty<java.lang.Double>
getStartProperty()
boolean
isDegenerate()
Tests whether the starting and ending values are the sameboolean
isInverted()
boolean
isInvertedScale()
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
reset()
void
setEnd(double value)
void
setExtent(double extent)
void
setMaximum(double maximum)
void
setMaximumExtent(double maximumExtent)
void
setMinimum(double minimum)
void
setMinimumExtent(double minimumExtent)
void
setMinMax(double min, double max)
void
setMinMax(double min, double max, double minExtent, double maxExtent)
void
setStart(double value)
void
setValue(double value, double extent)
java.lang.String
toString()
-
Methods inherited from class com.macrofocus.interval.AbstractBoundedInterval
addBoundedIntervalListener, addWeakBoundedIntervalListener, isFullRange, notifyBoundedIntervalChanged, removeBoundedIntervalListener, removeBoundedIntervalListeners
-
Methods inherited from class com.macrofocus.interval.AbstractMutableInterval
addIntervalListener, addWeakIntervalListener, notifyIntervalChanged, removeIntervalListener, removeIntervalListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.macrofocus.interval.BoundedInterval
addBoundedIntervalListener, addWeakBoundedIntervalListener, isFullRange, removeBoundedIntervalListener, removeBoundedIntervalListeners
-
Methods inherited from interface com.macrofocus.interval.Interval
addIntervalListener, addWeakIntervalListener, removeIntervalListener, removeIntervalListeners
-
-
-
-
Constructor Detail
-
SimpleBoundedInterval
public SimpleBoundedInterval(double start, double extent)
-
SimpleBoundedInterval
public SimpleBoundedInterval(double start, double minimum, double maximum)
-
SimpleBoundedInterval
public SimpleBoundedInterval(double start, double extent, double minimum, double maximum)
-
SimpleBoundedInterval
public SimpleBoundedInterval(MutableInterval interval, double minimum, double maximum)
-
-
Method Detail
-
setStart
public void setStart(double value)
- Specified by:
setStart
in interfaceMutableInterval
-
setEnd
public void setEnd(double value)
- Specified by:
setEnd
in interfaceMutableInterval
-
setExtent
public void setExtent(double extent)
- Specified by:
setExtent
in interfaceMutableInterval
-
setValue
public void setValue(double value, double extent)
- Specified by:
setValue
in interfaceMutableInterval
-
getStartProperty
public MutableProperty<java.lang.Double> getStartProperty()
- Specified by:
getStartProperty
in interfaceInterval
- Specified by:
getStartProperty
in interfaceMutableInterval
-
getEndProperty
public MutableProperty<java.lang.Double> getEndProperty()
- Specified by:
getEndProperty
in interfaceInterval
- Specified by:
getEndProperty
in interfaceMutableInterval
-
contains
public boolean contains(double value)
Description copied from interface:Interval
Tests if this interval contains the specified value
-
contains
public boolean contains(double start, double end)
Description copied from interface:Interval
Tests if this interval contains the specified interval
-
contains
public boolean contains(Interval interval)
Description copied from interface:Interval
Tests if this interval contains the specified interval
-
overlaps
public boolean overlaps(double start, double end)
Description copied from interface:Interval
Tests if this interval overlaps the specified interval.
-
overlaps
public boolean overlaps(Interval interval)
Description copied from interface:Interval
Tests if this interval overlaps the specified interval.
-
isDegenerate
public boolean isDegenerate()
Description copied from interface:Interval
Tests whether the starting and ending values are the same- Specified by:
isDegenerate
in interfaceInterval
- Returns:
- true if start and end values are identical, false otherwise
-
isInverted
public boolean isInverted()
- Specified by:
isInverted
in interfaceInterval
-
isInvertedScale
public boolean isInvertedScale()
- Specified by:
isInvertedScale
in interfaceBoundedInterval
-
setMinimum
public void setMinimum(double minimum)
- Specified by:
setMinimum
in interfaceMutableBoundedInterval
-
setMaximum
public void setMaximum(double maximum)
- Specified by:
setMaximum
in interfaceMutableBoundedInterval
-
getMinimum
public double getMinimum()
- Specified by:
getMinimum
in interfaceBoundedInterval
-
getMaximum
public double getMaximum()
- Specified by:
getMaximum
in interfaceBoundedInterval
-
setMinMax
public void setMinMax(double min, double max)
- Specified by:
setMinMax
in interfaceMutableBoundedInterval
-
setMinimumExtent
public void setMinimumExtent(double minimumExtent)
- Specified by:
setMinimumExtent
in interfaceMutableBoundedInterval
-
setMaximumExtent
public void setMaximumExtent(double maximumExtent)
- Specified by:
setMaximumExtent
in interfaceMutableBoundedInterval
-
setMinMax
public void setMinMax(double min, double max, double minExtent, double maxExtent)
- Specified by:
setMinMax
in interfaceMutableBoundedInterval
-
getMinimumExtent
public double getMinimumExtent()
- Specified by:
getMinimumExtent
in interfaceBoundedInterval
-
getMaximumExtent
public double getMaximumExtent()
- Specified by:
getMaximumExtent
in interfaceBoundedInterval
-
reset
public void reset()
- Specified by:
reset
in interfaceMutableBoundedInterval
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-