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.


Variable Index

 o a
The value of the string array is available as 'a'.

Constructor Index

 o StringArray(int)
Create an empty StringArray
 o StringArray(String[])
Create a new StringArray
 o StringArray(Vector)
Create a StringArray from a Vector, if the elements of the vector are not strings you will get a ClassCastException

Method Index

 o equals(Object)
Two arrays are equal if they have the same elements and are the same size.
 o hashCode()
Two arrays that are equal have the same hashcode
 o intern()
Intern all the strings in the array (ensuring that they are unique values, and allowng the use of == for comparing them.)
 o main(String[])
Test harness
 o toString()
Return a string representation listing all of the children

Variables

 o a
 public final String a[]
The value of the string array is available as 'a'.

Constructors

 o StringArray
 public StringArray(String array[])
Create a new StringArray

 o StringArray
 public StringArray(int size)
Create an empty StringArray

 o 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

Methods

 o 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.)

 o toString
 public final String toString()
Return a string representation listing all of the children

Overrides:
toString in class Object
 o 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
 o hashCode
 public int hashCode()
Two arrays that are equal have the same hashcode

Overrides:
hashCode in class Object
 o main
 public static void main(String arg[])
Test harness


All Packages  Class Hierarchy  This Package  Previous  Next  Index