Class OptionsString
java.lang.Object
|
+--OptionsString
- public class OptionsString
- extends java.lang.Object
this class performs the replacements when the user modifies the Replace characters mask
Method Summary |
private int |
find_position()
finds the number of elements different from " " in the userMask |
private java.lang.String |
ReplaceString(java.lang.String[] os,
java.lang.String[] ns,
java.lang.String str)
|
java.lang.String |
substitute(java.lang.String str)
substitute some substrings in a string. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
ui
UserInterface ui
data
java.lang.String[][] data
OptionsString
public OptionsString(UserInterface ui)
substitute
public java.lang.String substitute(java.lang.String str)
- substitute some substrings in a string.
the substrings to be replaced are in the vector old_tring
the substrings to be replaced with are in the vector new_string
- Parameters:
str
- is the string in which the replacements are performed- Returns:
- the modified string
- See Also:
find_position()
,
ReplaceString(String[],String[],String)
find_position
private int find_position()
- finds the number of elements different from " " in the userMask
ReplaceString
private java.lang.String ReplaceString(java.lang.String[] os,
java.lang.String[] ns,
java.lang.String str)
- Parameters:
os
- a vector containing the strings to be replacedns
- a vector containing the strigs to replace widthstr
- the string to be modified- Returns:
- the modified string