public class TaggedStringsSet extends java.lang.Object implements TaggedStrings
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
tag
The common tag for all the string values.
|
protected java.util.Set<java.lang.String> |
wrappedSet
Set being wrapped.
|
Constructor and Description |
---|
TaggedStringsSet(java.util.Set<java.lang.String> set,
java.lang.String tag)
Create a tagged strings set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsString(java.lang.String string)
See if specified string exists.
|
java.util.Set<java.lang.String> |
getAllStrings()
Get set of all unique string values.
|
java.util.Set<java.lang.String> |
getAllTags()
Get set of all unique tag values.
|
java.util.Set<java.lang.String> |
getSet()
Return the wrapped set.
|
int |
getStringCount()
Get number of strings.
|
java.lang.String |
getTag(java.lang.String string)
Get the tag value associated with a string.
|
void |
putTag(java.lang.String string,
java.lang.String tag)
Set the tag value associated with a string.
|
protected java.util.Set<java.lang.String> wrappedSet
protected java.lang.String tag
public TaggedStringsSet(java.util.Set<java.lang.String> set, java.lang.String tag)
set
- The set to wrap.tag
- The tag value for all set entries.public boolean containsString(java.lang.String string)
containsString
in interface TaggedStrings
string
- The string.public java.lang.String getTag(java.lang.String string)
getTag
in interface TaggedStrings
string
- The string.public void putTag(java.lang.String string, java.lang.String tag)
putTag
in interface TaggedStrings
string
- The string.tag
- The tag.
Note: the tag value is ignored.
public int getStringCount()
getStringCount
in interface TaggedStrings
public java.util.Set<java.lang.String> getAllTags()
getAllTags
in interface TaggedStrings
public java.util.Set<java.lang.String> getAllStrings()
getAllStrings
in interface TaggedStrings
public java.util.Set<java.lang.String> getSet()