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


Field Summary
(package private)  java.lang.String[][] data
           
(package private)  UserInterface ui
           
 
Constructor Summary
OptionsString(UserInterface ui)
           
 
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
 

Field Detail

ui

UserInterface ui

data

java.lang.String[][] data
Constructor Detail

OptionsString

public OptionsString(UserInterface ui)
Method Detail

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 replaced
ns - a vector containing the strigs to replace width
str - the string to be modified
Returns:
the modified string