net.sf.jeters.components
Class RegExReplacer.CustomReplacement

java.lang.Object
  extended by net.sf.jeters.components.RegExReplacer.Replacement
      extended by net.sf.jeters.components.RegExReplacer.CustomReplacement
All Implemented Interfaces:
RegExReplacer.ReplacementElement
Enclosing class:
RegExReplacer

public abstract static class RegExReplacer.CustomReplacement
extends RegExReplacer.Replacement

a class that represents a single replacement which is not based on regex, but on a custom method


Field Summary
 
Fields inherited from class net.sf.jeters.components.RegExReplacer.Replacement
description, rating
 
Constructor Summary
RegExReplacer.CustomReplacement()
          constructor that sets description to "" and rating to 0.
RegExReplacer.CustomReplacement(int rating)
          constructor that sets description to "".
RegExReplacer.CustomReplacement(java.lang.String description)
          constructor that sets rating to 0.
RegExReplacer.CustomReplacement(java.lang.String description, int rating)
          constructor that has parameters for all attributes.
 
Method Summary
abstract  java.lang.String apply(java.lang.String s)
          the method containing the replacement's functionality
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExReplacer.CustomReplacement

public RegExReplacer.CustomReplacement(java.lang.String description,
                                       int rating)
constructor that has parameters for all attributes.


RegExReplacer.CustomReplacement

public RegExReplacer.CustomReplacement()
constructor that sets description to "" and rating to 0. It can be used if you feel that the replacement absolutely does not require the user's attention.


RegExReplacer.CustomReplacement

public RegExReplacer.CustomReplacement(int rating)
constructor that sets description to "".


RegExReplacer.CustomReplacement

public RegExReplacer.CustomReplacement(java.lang.String description)
constructor that sets rating to 0.

Method Detail

apply

public abstract java.lang.String apply(java.lang.String s)
the method containing the replacement's functionality

Parameters:
s - the string this replacement will be applied on
Returns:
the string resulting from applying this replacement to the parameter s