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
-
Method Summary
Modifier and TypeMethodDescriptioncombine
(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty) Combine this property with anotherCombinable
instance.Returns an unmodifiableSet
of 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
Choice
instances into a newChoice
.When
aPossibleValues
is empty, this instance will not be able to combine with any otherChoice
instance.- Parameters:
aPossibleValues
- AList
of possible values for this property. If empty thisChoice
instance will be unable to combine with any otherChoice
instance.
-
Choice
Create a new property which may have a series of values. Those values will determine whether it is possible to combine two
Choice
instances into a newChoice
instance.When
aPossibleValues
is empty, this instance will not be able to combine with any otherChoice
instance.- Parameters:
aPossibleValues
- The possible values for this property. If empty thisChoice
instance will be unable to combine with any otherChoice
instance.
-
-
Method Details
-
getPossibleValues
Returns an unmodifiable
Set
of possible values for this property.- Returns:
- an unmodifiable
List
of possible values for this property. Can be empty.
-
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
Choice
with anotherCombinable
instance can only return a non-null
Combinable
instance if theCombinable
is an instance ofChoice
as well. In such case, the returnedCombinable
instance will be aChoice
instance which only contains the choices both properties had in common. When no common properties 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
-