public interface Discriminator
extends java.io.Serializable, java.lang.Cloneable
DiscriminatorRule
applies and will fire.
Objects that implement this interface compare an internal condition with
the circumstances that are specified in a RuleContext object,
to determine whether the condition is met in the specified context.
Most discriminators use an object to specify the internal condition.
For example, a PositionDiscriminator has a
ComponentInfo object that specifies the condition to be met.
The applies method for the PositionDiscriminator
compares its ComponentInfo object with the
ComponentInfo object from the RuleContext that
is passed to it.
PositionDiscriminator,
DiscriminatorRule,
RuleContext,
ComponentInfo| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(RuleContext context)
Specifies whether this
Discriminator applies. |
java.lang.Object |
clone()
Clones this
Discriminator. |
boolean applies(RuleContext context)
Discriminator applies.
Compares the information in the specified RuleContext
with its internal information.
If they match, this Discriminator applies.context - The context of the item to be painted.true if the information from the context meets
the condition specified in this Discriminator,
false if not.java.lang.Object clone()
Discriminator.Discriminator.