Class TLcdGXYAsynchronousPaintHint.Range
- All Implemented Interfaces:
TLcdGXYAsynchronousPaintHint.Combinable
- Enclosing class:
TLcdGXYAsynchronousPaintHint
Holder object for an object with a certain range.
-
Constructor Summary
ConstructorsConstructorDescriptionRange(double aMinimumValue, double aMaximumValue) Create a new property with a range. -
Method Summary
Modifier and TypeMethodDescriptioncombine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty) Combine this property with anotherCombinableinstance.doubleReturns the maximal value of the propertydoubleReturns 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
Rangeinstances 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
Combinableinstance.If for example a
Combinablespecifies the maximal refresh interval of anILcdGXYLayer, and for two instances these intervals are 20ms and 30 ms respectively, the combine method could return aCombinablewhich specifies a maximal refresh interval of 20ms. This way, the timings of bothCombinables are respected.The result of this method should be independent of the order of
thisandaOtherProperty, e.g.A.combine(B)should return anCombinableinstance which is equivalent to theCombinableinstance returned by callingB.combine(A).Combining a
Rangewith anotherCombinableinstance can only return a non-nullCombinableinstance if theCombinableis an instance ofRangeas well. In such case, the returnedCombinableinstance will be aRangeinstance with a range equal to the overlap of both ranges of the original properties. When no such overlap exists,nullwill be returned.- Specified by:
combinein interfaceTLcdGXYAsynchronousPaintHint.Combinable- Parameters:
aOtherProperty- The otherCombinableinstance- Returns:
- The combined instance, or
nullwhen both instances were not combinable with each other.
-
toString
-