Synergy Home Page

au.edu.swin.synergy.lib
Class BStringList

java.lang.Object
  |
  +--au.edu.swin.synergy.lib.BStringList

public class BStringList
extends Object
implements Serializable

This is a string list class Designed to make life easy for managing a list of strings (No supprises there:)

Requirement/analysis/design Reference:
 
Copyright Belongs To:
 
See Also:
, Serialized Form

Constructor Summary
BStringList()
          Creates an empty string list
BStringList(String param)
          Parse the param string and create a string list Tokens are seperated by white space unless surrounded in "quotes"
 
Method Summary
 void add(String str)
          Please complete the missing tags for add
 void assign(String str)
          This accepts a string with \n which are used to seperate the lines in the stringlist
 void clear()
          Please complete the missing tags for clear
 String get(int index)
          Please complete the missing tags for get
 int getCount()
          Please complete the missing tags for getCount
 BStringList getSubstringList(int beginIndex, int endIndex)
          This will return a new BStringList containing only the values in this string list between the indexes provided.
 void insert(int index, String str)
          Please complete the missing tags for insert
 void remove(int index)
          Please complete the missing tags for remove
 void remove(String str)
           
 void set(int index, String str)
           
 String toString()
          Enumerates the contents of the Stringlist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BStringList

public BStringList()
Creates an empty string list

BStringList

public BStringList(String param)
Parse the param string and create a string list Tokens are seperated by white space unless surrounded in "quotes"
Method Detail

get

public String get(int index)
Please complete the missing tags for get
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

set

public void set(int index,
                String str)

getCount

public int getCount()
Please complete the missing tags for getCount
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

add

public void add(String str)
Please complete the missing tags for add
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

remove

public void remove(int index)
Please complete the missing tags for remove
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

remove

public void remove(String str)

getSubstringList

public BStringList getSubstringList(int beginIndex,
                                    int endIndex)
This will return a new BStringList containing only the values in this string list between the indexes provided.
Parameters:
beginIndex - Where to start inclusive
endIndex - Where to end exclusive
Returns:
The elements in this BStringList between the two indexes in a new BStringList

assign

public void assign(String str)
This accepts a string with \n which are used to seperate the lines in the stringlist

clear

public void clear()
Please complete the missing tags for clear
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

insert

public void insert(int index,
                   String str)
Please complete the missing tags for insert
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

toString

public String toString()
Enumerates the contents of the Stringlist
Overrides:
toString in class Object

Synergy Home Page