net.sf.jeters.components
Class RegExReplacer.ReplacementGroup

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<RegExReplacer.ReplacementElement>
              extended by net.sf.jeters.components.RegExReplacer.ReplacementGroup
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<RegExReplacer.ReplacementElement>, java.util.Collection<RegExReplacer.ReplacementElement>, java.util.List<RegExReplacer.ReplacementElement>, java.util.RandomAccess, RegExReplacer.ReplacementElement
Enclosing class:
RegExReplacer

public static class RegExReplacer.ReplacementGroup
extends java.util.ArrayList<RegExReplacer.ReplacementElement>
implements RegExReplacer.ReplacementElement

a group of replacements. The elements can be groups again. This class simply extends ArrayList<ReplacementElement> (most importantly, it has the add-, size- and get-methods and allows for-in-loops). Some replacement-specific public attributes have been added.

See Also:
Serialized Form

Field Summary
 java.lang.String description
          a string describing this replacement group.
 int times
          how often this group is repeated.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RegExReplacer.ReplacementGroup(int times)
          constructor that sets description to "".
RegExReplacer.ReplacementGroup(int times, java.lang.String description)
          constructor that has parameters for all attributes.
 
Method Summary
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

times

public int times
how often this group is repeated. (compare "times"-attribute of RegExReplacer.Replacement). Note: Each time, the first replacement is applied as many times as its own time-attribute indicates, then the same is done with the second replacement and so on.


description

public java.lang.String description
a string describing this replacement group. It is used for generating the MediaWiki comment.

Constructor Detail

RegExReplacer.ReplacementGroup

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


RegExReplacer.ReplacementGroup

public RegExReplacer.ReplacementGroup(int times)
constructor that sets description to "".