Class TLcdGXYAsynchronousPaintHint.Choice
- All Implemented Interfaces:
TLcdGXYAsynchronousPaintHint.Combinable
- Enclosing class:
TLcdGXYAsynchronousPaintHint
Holder object for a property which can have a discrete set of values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncombine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty) Combine this property with anotherCombinableinstance.Returns an unmodifiableSetof possible values for this property.toString()
-
Constructor Details
-
Choice
Create a new property which may have a series of values. Those values will determine whether it is possible to combine two
Choiceinstances into a newChoice.When
aPossibleValuesis empty, this instance will not be able to combine with any otherChoiceinstance.- Parameters:
aPossibleValues- AListof possible values for this property. If empty thisChoiceinstance will be unable to combine with any otherChoiceinstance.
-
Choice
Create a new property which may have a series of values. Those values will determine whether it is possible to combine two
Choiceinstances into a newChoiceinstance.When
aPossibleValuesis empty, this instance will not be able to combine with any otherChoiceinstance.- Parameters:
aPossibleValues- The possible values for this property. If empty thisChoiceinstance will be unable to combine with any otherChoiceinstance.
-
-
Method Details
-
getPossibleValues
Returns an unmodifiable
Setof possible values for this property.- Returns:
- an unmodifiable
Listof possible values for this property. Can be empty.
-
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
Choicewith anotherCombinableinstance can only return a non-nullCombinableinstance if theCombinableis an instance ofChoiceas well. In such case, the returnedCombinableinstance will be aChoiceinstance which only contains the choices both properties had in common. When no common properties 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
-