public static class TLcdGXYAsynchronousPaintHint.Choice extends Object implements TLcdGXYAsynchronousPaintHint.Combinable
Holder object for a property which can have a discrete set of values.
Constructor and Description |
---|
Choice(Object... aPossibleValues)
Create a new property which may have a series of values.
|
Choice(Set<?> aPossibleValues)
Create a new property which may have a series of values.
|
Modifier and Type | Method and Description |
---|---|
TLcdGXYAsynchronousPaintHint.Combinable |
combine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty)
Combine this property with another
Combinable instance. |
Set<Object> |
getPossibleValues()
Returns an unmodifiable
Set of possible values for this property. |
String |
toString() |
public Choice(Set<?> aPossibleValues)
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 new
Choice
.
When aPossibleValues
is empty, this instance will not be able to combine with
any other Choice
instance.
aPossibleValues
- A List
of possible values for this property. If empty
this Choice
instance will be unable to combine with any
other Choice
instance.public Choice(Object... aPossibleValues)
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 new
Choice
instance.
When aPossibleValues
is empty, this instance will not be able to combine with
any other Choice
instance.
aPossibleValues
- The possible values for this property. If empty this
Choice
instance will be unable to combine with any other
Choice
instance.public Set<Object> getPossibleValues()
Returns an unmodifiable Set
of possible values for this property.
List
of possible values for this property. Can be empty.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 Choice
with another Combinable
instance can
only return a non-null
Combinable
instance if the
Combinable
is an instance of Choice
as well. In
such case, the returned Combinable
instance will be a Choice
instance
which only contains the choices both properties had in common. When no common properties
exists, null
will be returned.
combine
in interface TLcdGXYAsynchronousPaintHint.Combinable
aOtherProperty
- The other Combinable
instancenull
when both instances were not combinable
with each other.