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 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()MutableProperty<java.lang.Double>getEndProperty()doublegetExtent()doublegetMaximum()doublegetMaximumExtent()doublegetMinimum()doublegetMinimumExtent()doublegetStart()MutableProperty<java.lang.Double>getStartProperty()booleanisDegenerate()Tests whether the starting and ending values are the samebooleanisInverted()booleanisInvertedScale()booleanoverlaps(double start, double end)Tests if this interval overlaps the specified interval.booleanoverlaps(Interval interval)Tests if this interval overlaps the specified interval.voidreset()voidsetEnd(double value)voidsetExtent(double extent)voidsetMaximum(double maximum)voidsetMaximumExtent(double maximumExtent)voidsetMinimum(double minimum)voidsetMinimumExtent(double minimumExtent)voidsetMinMax(double min, double max)voidsetMinMax(double min, double max, double minExtent, double maxExtent)voidsetStart(double value)voidsetValue(double value, double extent)java.lang.StringtoString()-
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:
setStartin interfaceMutableInterval
-
setEnd
public void setEnd(double value)
- Specified by:
setEndin interfaceMutableInterval
-
setExtent
public void setExtent(double extent)
- Specified by:
setExtentin interfaceMutableInterval
-
setValue
public void setValue(double value, double extent)- Specified by:
setValuein interfaceMutableInterval
-
getStartProperty
public MutableProperty<java.lang.Double> getStartProperty()
- Specified by:
getStartPropertyin interfaceInterval- Specified by:
getStartPropertyin interfaceMutableInterval
-
getEndProperty
public MutableProperty<java.lang.Double> getEndProperty()
- Specified by:
getEndPropertyin interfaceInterval- Specified by:
getEndPropertyin interfaceMutableInterval
-
contains
public boolean contains(double value)
Description copied from interface:IntervalTests if this interval contains the specified value
-
contains
public boolean contains(double start, double end)Description copied from interface:IntervalTests if this interval contains the specified interval
-
contains
public boolean contains(Interval interval)
Description copied from interface:IntervalTests if this interval contains the specified interval
-
overlaps
public boolean overlaps(double start, double end)Description copied from interface:IntervalTests if this interval overlaps the specified interval.
-
overlaps
public boolean overlaps(Interval interval)
Description copied from interface:IntervalTests if this interval overlaps the specified interval.
-
isDegenerate
public boolean isDegenerate()
Description copied from interface:IntervalTests whether the starting and ending values are the same- Specified by:
isDegeneratein interfaceInterval- Returns:
- true if start and end values are identical, false otherwise
-
isInverted
public boolean isInverted()
- Specified by:
isInvertedin interfaceInterval
-
isInvertedScale
public boolean isInvertedScale()
- Specified by:
isInvertedScalein interfaceBoundedInterval
-
setMinimum
public void setMinimum(double minimum)
- Specified by:
setMinimumin interfaceMutableBoundedInterval
-
setMaximum
public void setMaximum(double maximum)
- Specified by:
setMaximumin interfaceMutableBoundedInterval
-
getMinimum
public double getMinimum()
- Specified by:
getMinimumin interfaceBoundedInterval
-
getMaximum
public double getMaximum()
- Specified by:
getMaximumin interfaceBoundedInterval
-
setMinMax
public void setMinMax(double min, double max)- Specified by:
setMinMaxin interfaceMutableBoundedInterval
-
setMinimumExtent
public void setMinimumExtent(double minimumExtent)
- Specified by:
setMinimumExtentin interfaceMutableBoundedInterval
-
setMaximumExtent
public void setMaximumExtent(double maximumExtent)
- Specified by:
setMaximumExtentin interfaceMutableBoundedInterval
-
setMinMax
public void setMinMax(double min, double max, double minExtent, double maxExtent)- Specified by:
setMinMaxin interfaceMutableBoundedInterval
-
getMinimumExtent
public double getMinimumExtent()
- Specified by:
getMinimumExtentin interfaceBoundedInterval
-
getMaximumExtent
public double getMaximumExtent()
- Specified by:
getMaximumExtentin interfaceBoundedInterval
-
reset
public void reset()
- Specified by:
resetin interfaceMutableBoundedInterval
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-