Class TLcdGXYAsynchronousPaintHint.Range
- All Implemented Interfaces:
TLcdGXYAsynchronousPaintHint.Combinable
- Enclosing class:
TLcdGXYAsynchronousPaintHint
Holder object for an object with a certain range.
-
Constructor Summary
ConstructorDescriptionRange
(double aMinimumValue, double aMaximumValue) Create a new property with a range. -
Method Summary
Modifier and TypeMethodDescriptioncombine
(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty) Combine this property with anotherCombinable
instance.double
Returns the maximal value of the propertydouble
Returns the minimal value of the propertytoString()
-
Constructor Details
-
Range
public Range(double aMinimumValue, double aMaximumValue) Create a new property with a range. This range will determine whether it is possible to combine two
Range
instances into a newRange
.- Parameters:
aMinimumValue
- the minimum value for the property. Must be smaller than or equal toaMaximumValue
.aMaximumValue
- the maximum value for the property. Must be greater than or equal to
-
-
Method Details
-
getMinimumValue
public double getMinimumValue()Returns the minimal value of the property- Returns:
- the minimal value of the property
-
getMaximumValue
public double getMaximumValue()Returns the maximal value of the property- Returns:
- the maximal value of the property
-
combine
public TLcdGXYAsynchronousPaintHint.Combinable combine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty) Combine this property with another
Combinable
instance.If for example a
Combinable
specifies the maximal refresh interval of anILcdGXYLayer
, and for two instances these intervals are 20ms and 30 ms respectively, the combine method could return aCombinable
which specifies a maximal refresh interval of 20ms. This way, the timings of bothCombinable
s are respected.The result of this method should be independent of the order of
this
andaOtherProperty
, e.g.A.combine(B)
should return anCombinable
instance which is equivalent to theCombinable
instance returned by callingB.combine(A)
.Combining a
Range
with anotherCombinable
instance can only return a non-null
Combinable
instance if theCombinable
is an instance ofRange
as well. In such case, the returnedCombinable
instance will be aRange
instance with a range equal to the overlap of both ranges of the original properties. When no such overlap exists,null
will be returned.- Specified by:
combine
in interfaceTLcdGXYAsynchronousPaintHint.Combinable
- Parameters:
aOtherProperty
- The otherCombinable
instance- Returns:
- The combined instance, or
null
when both instances were not combinable with each other.
-
toString
-