|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webmacro.util.StringArray
This wraps a string array such that it can be used as the index of a hashtable, etc. It is immutable. You can directly access the final array object (a) that it contains.
Field Summary | |
java.lang.String[] |
a
The value of the string array is available as 'a'. |
Constructor Summary | |
StringArray(int size)
Create an empty StringArray |
|
StringArray(java.lang.String[] array)
Create a new StringArray |
|
StringArray(java.util.Vector stringVector)
Create a StringArray from a Vector, if the elements of the vector are not strings you will get a ClassCastException |
Method Summary | |
boolean |
equals(java.lang.Object o)
Two arrays are equal if they have the same elements and are the same size. |
int |
hashCode()
Two arrays that are equal have the same hashcode |
void |
intern()
Intern all the strings in the array (ensuring that they are unique values, and allowng the use of == for comparing them.) |
static void |
main(java.lang.String[] arg)
Test harness |
java.lang.String |
toString()
Return a string representation listing all of the children |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public final java.lang.String[] a
Constructor Detail |
public StringArray(java.lang.String[] array)
public StringArray(int size)
public StringArray(java.util.Vector stringVector)
Method Detail |
public final void intern()
public final java.lang.String toString()
toString
in class java.lang.Object
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static void main(java.lang.String[] arg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |