interface RuleListElement
RuleContainer
to maintain an ordered list of
elements that can be either a Rule
or another
RuleContainer
. This makes RuleContainer
instances arbitrarily nestable.Modifier and Type | Method and Description |
---|---|
void |
apply(int type)
Apply every rule of the specified type, in the order they were added
to this container OR if this instance is a rule of the given type,
apply it and return.
|
void |
cleanup()
Termination hook to allow resources to be cleaned up when this object is
about to go out of service.
|
boolean |
hasType(int type)
Indicates whether this object either represents a rule of the specified
type OR contains any rules of the specified type.
|
boolean |
isContainer()
Reports whether this instance is a rule container.
|
boolean hasType(int type)
type
- Type of rule for which to search: init, walk, or post, using
the RULE_*
constants.true
if the object is a rule of the specified
type or if the object's list of rules contains any rule of
the specified type, else false
.boolean isContainer()
true
if this instance is a rule container.void apply(int type)
type
- Type of rule to apply: init, walk, or post, using the
RULE_*
constants.void cleanup()