|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.miami.romeo.config.Alphabetizer
com.miami.romeo.config.SortedStrings
An object that represents an array of alpabetized Strings. Implemented with an String array that grows as appropriate.
Field Summary | |
static int |
DEFAULT_SIZE
|
Constructor Summary | |
SortedStrings()
Constructor creates a new SortedStrings object of default size. |
|
SortedStrings(java.io.DataInput in)
Contructor creates a new SortedStrings object using a DataInput object. |
|
SortedStrings(int initial_size)
Constructor creates a new SortedStrings object of size passed. |
|
SortedStrings(java.lang.String[] array)
Contructor creates a new SortedStrings object, initializing it with the String[] passed. |
Method Summary | |
void |
add(java.lang.String num)
Adds the String passed to the array in its proper place -- sorted. |
void |
clear()
Clears the Strings from the object and creates a new one of the default size. |
void |
clear(int initial_size)
Clears the Strings from the object and creates a new one of the size passed. |
java.lang.Object |
clone()
Clones the SortedStrings object. |
boolean |
contains(java.lang.String num)
Returns true flag if the String passed is in the array. |
SortedStrings |
diff(SortedStrings that)
Returns a SortedStrings object that has the Strings from this object that are not in the one passed. |
void |
emit(java.io.DataOutput out)
Writes a the SortedStrings object to the DataOutput object. |
int |
indexOf(java.lang.String num)
Returns String index of the int passed. |
SortedStrings |
merge(SortedStrings that)
Merge two sorted lists of integers. |
void |
remove(java.lang.String num)
Removes the String passed from the array. |
void |
removeIndex(int index)
Removes the String from the beginning of the array to the index passed. |
protected int |
search(java.lang.String num)
Returns the index where the String value passed is located or where it should be sorted to if it is not present. |
static java.lang.String[] |
sort(java.lang.String[] input)
Returns a sorted String[] from the String[] passed. |
java.lang.String |
stringAt(int index)
Returns the String value at the index passed. |
int |
stringCount()
Returns the number of Strings in the array. |
java.lang.String[] |
toStringArray()
Returns an String[] that contains the value in the SortedStrings object. |
Methods inherited from class com.miami.romeo.config.Alphabetizer |
compare, compare, equalTo, greaterThan, lessThan |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_SIZE
Constructor Detail |
public SortedStrings()
public SortedStrings(int initial_size)
public SortedStrings(java.io.DataInput in) throws java.io.IOException
public SortedStrings(java.lang.String[] array)
Method Detail |
public java.lang.Object clone()
public void emit(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public SortedStrings merge(SortedStrings that)
public SortedStrings diff(SortedStrings that)
public void clear()
public void clear(int initial_size)
public void add(java.lang.String num)
public void remove(java.lang.String num)
public void removeIndex(int index)
public boolean contains(java.lang.String num)
public int stringCount()
public int indexOf(java.lang.String num)
public java.lang.String stringAt(int index)
protected int search(java.lang.String num)
public java.lang.String[] toStringArray()
public static java.lang.String[] sort(java.lang.String[] input)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |