Class StringSet
- java.lang.Object
-
- org.apache.manifoldcf.core.interfaces.StringSet
-
public class StringSet extends java.lang.Object
Immutable helper class, representing an unordered set of strings
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected java.lang.String
descriptiveString
protected java.util.HashMap
hashtable
-
Constructor Summary
Constructors Constructor Description StringSet()
Create the empty stringsetStringSet(java.lang.String x)
Create a stringset from a single string.StringSet(java.lang.String[] array)
Create the stringset from a string arrayStringSet(java.util.Map table)
Create the stringset from a Map of stringsStringSet(java.util.Vector stringVector)
Create the stringset from a vector of stringsStringSet(StringSetBuffer buffer)
Create the stringset from a stringsetbufferStringSet(StringSet oldOne, java.lang.String prefix)
Get a new stringset based on an old one plus a prefix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.String key)
Check if a key is in the setboolean
contains(StringSet x)
boolean
equals(java.lang.Object o)
Perform equals operationjava.lang.String[]
getArray(java.lang.String prefix)
Get array of stringsjava.lang.String
getDescriptiveString()
Convert to a descriptive string.java.util.Iterator
getKeys()
Enumerate through the keysint
hashCode()
Calculate the hashcodeint
size()
Get number of keys
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Perform equals operation- Overrides:
equals
in classjava.lang.Object
-
getDescriptiveString
public java.lang.String getDescriptiveString()
Convert to a descriptive string.- Returns:
- the descriptive string.
-
-