org.apache.manifoldcf.core.interfaces
Class StringSet

java.lang.Object
  extended by org.apache.manifoldcf.core.interfaces.StringSet

public class StringSet
extends java.lang.Object

Immutable helper class, representing an unordered set of strings


Field Summary
static java.lang.String _rcsid
           
protected  java.lang.String descriptiveString
           
protected  java.util.HashMap hashtable
           
 
Constructor Summary
StringSet()
          Create the empty stringset
StringSet(java.util.Map table)
          Create the stringset from a Map of strings
StringSet(java.lang.String x)
          Create a stringset from a single string.
StringSet(java.lang.String[] array)
          Create the stringset from a string array
StringSet(StringSetBuffer buffer)
          Create the stringset from a stringsetbuffer
StringSet(StringSet oldOne, java.lang.String prefix)
          Get a new stringset based on an old one plus a prefix.
StringSet(java.util.Vector stringVector)
          Create the stringset from a vector of strings
 
Method Summary
 boolean contains(java.lang.String key)
          Check if a key is in the set
 boolean contains(StringSet x)
           
 boolean equals(java.lang.Object o)
          Perform equals operation
 java.lang.String[] getArray(java.lang.String prefix)
          Get array of strings
 java.lang.String getDescriptiveString()
          Convert to a descriptive string.
 java.util.Iterator getKeys()
          Enumerate through the keys
 int hashCode()
          Calculate the hashcode
 int size()
          Get number of keys
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

hashtable

protected java.util.HashMap hashtable

descriptiveString

protected java.lang.String descriptiveString
Constructor Detail

StringSet

public StringSet()
Create the empty stringset


StringSet

public StringSet(StringSetBuffer buffer)
Create the stringset from a stringsetbuffer


StringSet

public StringSet(java.lang.String x)
Create a stringset from a single string.


StringSet

public StringSet(java.lang.String[] array)
Create the stringset from a string array


StringSet

public StringSet(java.util.Vector stringVector)
Create the stringset from a vector of strings


StringSet

public StringSet(java.util.Map table)
Create the stringset from a Map of strings


StringSet

public StringSet(StringSet oldOne,
                 java.lang.String prefix)
Get a new stringset based on an old one plus a prefix.

Method Detail

contains

public boolean contains(java.lang.String key)
Check if a key is in the set


contains

public boolean contains(StringSet x)

getKeys

public java.util.Iterator getKeys()
Enumerate through the keys


size

public int size()
Get number of keys


getArray

public java.lang.String[] getArray(java.lang.String prefix)
Get array of strings


hashCode

public int hashCode()
Calculate the hashcode

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Perform equals operation

Overrides:
equals in class java.lang.Object

getDescriptiveString

public java.lang.String getDescriptiveString()
Convert to a descriptive string.

Returns:
the descriptive string.