Structured Text Toolkit

com.saelist.stx.operators
Class ReplaceOperator

java.lang.Object
  extended bycom.saelist.stx.operators.AbstractOperator
      extended bycom.saelist.stx.operators.ReplaceOperator
All Implemented Interfaces:
Operator

public class ReplaceOperator
extends AbstractOperator

See Operator for general description of the Operator concept in stx. ReplaceOperator performs a regular expression replacement on each pair it visits.


Field Summary
 
Fields inherited from class com.saelist.stx.operators.AbstractOperator
config, logger
 
Constructor Summary
ReplaceOperator()
           
 
Method Summary
 void init()
          Caches the pattern and replacement settings in variables.
 void operate(Pair pair)
          Performs the replacement operation on the given pair.
 
Methods inherited from class com.saelist.stx.operators.AbstractOperator
init, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplaceOperator

public ReplaceOperator()
Method Detail

init

public void init()
Caches the pattern and replacement settings in variables.

Overrides:
init in class AbstractOperator

operate

public void operate(Pair pair)
Performs the replacement operation on the given pair.

Specified by:
operate in interface Operator
Specified by:
operate in class AbstractOperator
Throws:
java.lang.IllegalStateException - if this hasn't been initialized.

Structured Text Toolkit