com.ibm.hats.common
Class TextReplacementList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.Vector
com.ibm.hats.common.TextReplacementList
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, List, RandomAccess
public class TextReplacementList
- extends Vector
A list of TextReplacementPairs. It is used by the text replacement
logic to perform a set of text replacements on the contents of a host screen.
- See Also:
- Serialized Form
|
Constructor Summary |
TextReplacementList()
Constructs an empty list of TextReplacementPairs. |
TextReplacementList(String settingsString)
Create a TextReplacementList object containing the String to be replaced and its
replacing string, as well as additional options that determine the string-matching
criteria. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
PAIR_SEPARATOR
public static final String PAIR_SEPARATOR
- See Also:
- Constant Field Values
TextReplacementList
public TextReplacementList()
- Constructs an empty list of
TextReplacementPairs.
TextReplacementList
public TextReplacementList(String settingsString)
- Create a TextReplacementList object containing the String to be replaced and its
replacing string, as well as additional options that determine the string-matching
criteria.
Format is:
from=to,[matchCase],[matchLTR],[matchRTL],[matchReverse],[toImage]
If [toImage] is specified, the "to" string is treated as the path to an image
and not just plain text.
- Parameters:
settingsString - - "from" string, "to" string, and optional string-matching criteria.
getPair
public TextReplacementPair getPair(int index)
- Gets a
TextReplacementPair at the specified index.
addPair
public void addPair(TextReplacementPair pair)
- Appends a
TextReplacementPair to the list.
toString
public String toString()
- Gets this list as a string, for debugging purposes.
- Overrides:
toString in class Vector
toSettingsString
public String toSettingsString()
toHashtable
public Hashtable toHashtable()
- Gets this list as a hashtable of
TextReplacementPair.getFrom() strings
to TextReplacementPair.getTo() strings.
clone
public Object clone()
- Overrides:
clone in class Vector