local.ua
Class StringList

java.lang.Object
  |
  +--org.zoolu.tools.Configure
        |
        +--local.ua.StringList

public final class StringList
extends org.zoolu.tools.Configure

Classs StringList handles a vector of Strings. It can be used to load, manage, and save string values.


Fields inherited from class org.zoolu.tools.Configure
NONE
 
Constructor Summary
StringList(java.lang.String file)
          Costructs a new StringList from the specified file
 
Method Summary
 void addElement(java.lang.String elem)
          Adds element
 boolean contains(java.lang.String elem)
          Whether the element is present
 java.lang.String elementAt(int i)
          Gets the element at positon i
 java.util.Vector getElements()
          Gets elements
 int indexOf(java.lang.String elem)
          Index of the element (if present)
 void insertElementAt(java.lang.String elem, int i)
          Inserts element at positon i
 void load()
          Loads list
protected  void parseLine(java.lang.String line)
          Parses a single line (loaded from the config file)
 void removeElementAt(int i)
          Removes element at positon i
 void save()
          Saves list
protected  java.lang.String toLines()
          Converts the entire object into lines (to be saved into the config file)
 
Methods inherited from class org.zoolu.tools.Configure
loadFile, saveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringList

public StringList(java.lang.String file)
Costructs a new StringList from the specified file
Method Detail

load

public void load()
Loads list

save

public void save()
Saves list

getElements

public java.util.Vector getElements()
Gets elements

elementAt

public java.lang.String elementAt(int i)
Gets the element at positon i

insertElementAt

public void insertElementAt(java.lang.String elem,
                            int i)
Inserts element at positon i

removeElementAt

public void removeElementAt(int i)
Removes element at positon i

addElement

public void addElement(java.lang.String elem)
Adds element

contains

public boolean contains(java.lang.String elem)
Whether the element is present

indexOf

public int indexOf(java.lang.String elem)
Index of the element (if present)

parseLine

protected void parseLine(java.lang.String line)
Parses a single line (loaded from the config file)
Overrides:
parseLine in class org.zoolu.tools.Configure

toLines

protected java.lang.String toLines()
Converts the entire object into lines (to be saved into the config file)
Overrides:
toLines in class org.zoolu.tools.Configure