public class TagSet
extends java.lang.Object
| Constructor and Description |
|---|
TagSet()
Instantiates a new TagSet with initial size of 10.
|
TagSet(int size)
Instantiates a new tag set initialized with the given size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tag tag)
Adds the Tag tag to TagSet.
|
Tag[] |
asArray()
Return Tags contained in TagSet as new array.
|
void |
clear()
Reset the TagSet to contain 0 tags.
|
void |
clearAndNullTags()
Clear.
|
boolean |
contains(java.lang.String key,
java.lang.String value)
Checks if a Tag with given key and value is contained in TagSet.
|
boolean |
contains(Tag tag)
Checks if 'tag' is contained in TagSet.
|
boolean |
containsKey(java.lang.String key)
Checks if any tag has the key 'key'.
|
Tag |
get(int index)
Find Tag by given index.
|
Tag |
get(java.lang.String key)
Find Tag by given key.
|
Tag[] |
getTags()
Return Tags array contained in TagSet.
|
java.lang.String |
getValue(java.lang.String key)
Get the value for a given key.
|
void |
set(Tag[] tagArray)
Sets the tags from 'tagArray'.
|
void |
set(TagSet tagSet)
Sets the tags from 'tagSet'.
|
int |
size() |
java.lang.String |
toString() |
public TagSet()
public TagSet(int size)
size - the initial size.public void clear()
public int size()
public void clearAndNullTags()
public Tag[] asArray()
public Tag get(int index)
index - the index of tag.public Tag get(java.lang.String key)
key - the key as intern String.public Tag[] getTags()
public boolean containsKey(java.lang.String key)
key - the key as intern String.public java.lang.String getValue(java.lang.String key)
key - the key as intern Stringpublic void add(Tag tag)
tag - the Tag to be addedpublic void set(Tag[] tagArray)
tagArray - the tag arraypublic void set(TagSet tagSet)
tagSet - the tag setpublic boolean contains(Tag tag)
tag - the tagpublic boolean contains(java.lang.String key,
java.lang.String value)
key - the key as intern Stringvalue - the value as intern Stringpublic java.lang.String toString()
toString in class java.lang.Object