All Packages Class Hierarchy This Package Previous Next Index
Class org.webmacro.util.StringArray
java.lang.Object
|
+----org.webmacro.util.StringArray
- public final class StringArray
- extends Object
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.
-
a
- The value of the string array is available as 'a'.
-
StringArray(int)
- Create an empty StringArray
-
StringArray(String[])
- Create a new StringArray
-
StringArray(Vector)
- Create a StringArray from a Vector, if the elements of the vector
are not strings you will get a ClassCastException
-
equals(Object)
- Two arrays are equal if they have the same elements and are
the same size.
-
hashCode()
- Two arrays that are equal have the same hashcode
-
intern()
- Intern all the strings in the array (ensuring that they are
unique values, and allowng the use of == for comparing them.)
-
main(String[])
- Test harness
-
toString()
- Return a string representation listing all of the children
a
public final String a[]
- The value of the string array is available as 'a'.
StringArray
public StringArray(String array[])
- Create a new StringArray
StringArray
public StringArray(int size)
- Create an empty StringArray
StringArray
public StringArray(Vector stringVector)
- Create a StringArray from a Vector, if the elements of the vector
are not strings you will get a ClassCastException
intern
public final void intern()
- Intern all the strings in the array (ensuring that they are
unique values, and allowng the use of == for comparing them.)
toString
public final String toString()
- Return a string representation listing all of the children
- Overrides:
- toString in class Object
equals
public final boolean equals(Object o)
- Two arrays are equal if they have the same elements and are
the same size.
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Two arrays that are equal have the same hashcode
- Overrides:
- hashCode in class Object
main
public static void main(String arg[])
- Test harness
All Packages Class Hierarchy This Package Previous Next Index