public static class TLcdGXYAsynchronousPaintHint.EqualsCombinable extends Object implements TLcdGXYAsynchronousPaintHint.Combinable
Wrapper class around any Object
, allowing it to implement the Combinable
interface.
EqualsCombinable
instances will only combine with other EqualsCombinable
instances
when the wrapped Object
s are equal.
Constructor and Description |
---|
EqualsCombinable(Object aDelegate)
Wrap
aDelegate with the Combinable interface |
Modifier and Type | Method and Description |
---|---|
TLcdGXYAsynchronousPaintHint.Combinable |
combine(TLcdGXYAsynchronousPaintHint.Combinable aOtherProperty)
Combine this property with another
Combinable instance. |
Object |
getDelegate()
Returns the wrapped object
|
String |
toString() |
public EqualsCombinable(Object aDelegate)
aDelegate
with the Combinable
interfaceaDelegate
- The delegate objectpublic Object getDelegate()
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 EqualsCombinable
instance with another Combinable
instance can
only return a non-null
Combinable
instance if the
Combinable
is an instance of EqualsCombinable
as well. In
such case, the returned Combinable
will be a EqualsCombinable
when both wrapped objects are equal. The returned EqualsCombinable
will
then have that particular object as delegate object. If both wrapped objects are not equal,
null
will be returned.
combine
in interface TLcdGXYAsynchronousPaintHint.Combinable
aOtherProperty
- The other Combinable
instancenull
when both instances were not combinable
with each other.