|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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()
public final boolean equals(java.lang.Object o)
public int hashCode()
public static void main(java.lang.String[] arg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |