public static class TLcdGXYAsynchronousPaintHint.Range extends Object implements TLcdGXYAsynchronousPaintHint.Combinable
Holder object for an object with a certain range.
Constructor and Description |
---|
Range(double aMinimumValue,
double aMaximumValue)
Create a new property with a range.
|
Modifier and Type | Method and Description |
---|---|
TLcdGXYAsynchronousPaintHint.Combinable |
combine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty)
Combine this property with another
Combinable instance. |
double |
getMaximumValue()
Returns the maximal value of the property
|
double |
getMinimumValue()
Returns the minimal value of the property
|
String |
toString() |
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 new Range
.
aMinimumValue
- the minimum value for the property. Must be smaller than or equal to
aMaximumValue
.aMaximumValue
- the maximum value for the property. Must be greater than or equal topublic double getMinimumValue()
public double getMaximumValue()
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 an
ILcdGXYLayer
, and for two instances these intervals are 20ms and 30 ms
respectively, the combine method could return a Combinable
which specifies a maximal refresh
interval of 20ms. This way, the timings of both Combinable
s are respected.
The result of this method should be independent of the order of this
and
aOtherProperty
, e.g. A.combine(B)
should return an
Combinable
instance which is equivalent to the
Combinable
instance returned by calling B.combine(A)
.
Combining a Range
with another Combinable
instance can
only return a non-null
Combinable
instance if the
Combinable
is an instance of Range
as well. In such
case, the returned Combinable
instance will be a Range
instance with
a range equal to the overlap of both ranges of the original properties. When no such overlap
exists, null
will be returned.
combine
in interface TLcdGXYAsynchronousPaintHint.Combinable
aOtherProperty
- The other Combinable
instancenull
when both instances were not combinable
with each other.