Class GraphRule

  • All Implemented Interfaces:
    org.ocpsoft.rewrite.config.Condition, org.ocpsoft.rewrite.config.Operation, org.ocpsoft.rewrite.config.Rule, org.ocpsoft.rewrite.context.Context

    public abstract class GraphRule
    extends Object
    implements org.ocpsoft.rewrite.config.Rule, org.ocpsoft.rewrite.context.Context
    Base class for Rule implementations that operate on GraphRewrite events.
    Author:
    Lincoln Baxter, III
    • Constructor Detail

      • GraphRule

        public GraphRule()
    • Method Detail

      • evaluate

        public abstract boolean evaluate​(GraphRewrite event,
                                         org.ocpsoft.rewrite.context.EvaluationContext context)
        Evaluate this rule against the given GraphRewrite event. If this condition does not apply to the given event, it must return false. If the condition applies and is satisfied, return true.
      • perform

        public abstract void perform​(GraphRewrite event,
                                     org.ocpsoft.rewrite.context.EvaluationContext context)
        Perform the Operation.
      • containsKey

        public boolean containsKey​(Object key)
        Specified by:
        containsKey in interface org.ocpsoft.rewrite.context.Context
      • put

        public void put​(Object key,
                        Object value)
        Specified by:
        put in interface org.ocpsoft.rewrite.context.Context
      • get

        public Object get​(Object key)
        Specified by:
        get in interface org.ocpsoft.rewrite.context.Context
      • clear

        public void clear()
        Specified by:
        clear in interface org.ocpsoft.rewrite.context.Context
      • evaluate

        public final boolean evaluate​(org.ocpsoft.rewrite.event.Rewrite event,
                                      org.ocpsoft.rewrite.context.EvaluationContext context)
        Specified by:
        evaluate in interface org.ocpsoft.rewrite.config.Condition
      • perform

        public final void perform​(org.ocpsoft.rewrite.event.Rewrite event,
                                  org.ocpsoft.rewrite.context.EvaluationContext context)
        Specified by:
        perform in interface org.ocpsoft.rewrite.config.Operation