001    package com.saelist.stx;
002    
003    import java.util.Iterator;
004    
005    
006    /** Performs an operation on a set of Pairs.
007      * Lifecycle: Create { init { visit { operate } } }.
008      */
009    public interface Operator {
010    
011      /** Configures the operator before a round of visits.*/
012      public void init(Pair config);
013    
014      /** Calls operate on each pair. */
015      public void visit(Iterator pairs);
016    
017      /** Operates on the pair. */
018      public void operate(Pair pair);
019    
020    }
021