|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object MapBasedTagGroup
public class MapBasedTagGroup
TagGroup that uses a key-value-Map to store tags
Constructor Summary | |
---|---|
MapBasedTagGroup(Iterable<Tag> tags)
|
|
MapBasedTagGroup(Map<String,String> tagMap)
|
|
MapBasedTagGroup(Tag... tags)
|
Method Summary | |
---|---|
boolean |
contains(String key,
String value)
returns true if this tag group contains the tag |
boolean |
contains(Tag tag)
returns true if this tag group contains the given tag |
boolean |
containsKey(String key)
returns true if this tag group contains a tag with the given key |
boolean |
containsValue(String value)
returns true if this tag group contains at least one tag with the given value |
String |
getValue(String key)
returns the value for the given key or null if no tag in this group uses that key |
boolean |
isEmpty()
returns true if this group contains any tags |
Iterator<Tag> |
iterator()
returns an Iterator providing access to all Tags. |
int |
size()
returns the number of tags in this group |
String |
toString()
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MapBasedTagGroup(Map<String,String> tagMap)
tagMap
- map from keys to values; != null;
must not be modified after being used as parameterpublic MapBasedTagGroup(Iterable<Tag> tags)
tags
- tags to add to the group; != null, each != nullpublic MapBasedTagGroup(Tag... tags)
tags
- tags to add to the group; each != nullMethod Detail |
---|
public String getValue(String key)
TagGroup
getValue
in interface TagGroup
key
- key whose value will be returned; != nullpublic boolean containsKey(String key)
TagGroup
containsKey
in interface TagGroup
key
- key to check for; != nullpublic boolean containsValue(String value)
TagGroup
containsValue
in interface TagGroup
value
- value to check for; != nullpublic boolean contains(Tag tag)
TagGroup
contains
in interface TagGroup
tag
- tag to check for; != nullpublic boolean contains(String key, String value)
TagGroup
contains
in interface TagGroup
key
- key of the tag to check for; != nullvalue
- value of the tag to check for; != nullpublic int size()
TagGroup
size
in interface TagGroup
public boolean isEmpty()
TagGroup
isEmpty
in interface TagGroup
public Iterator<Tag> iterator()
Iterator.remove()
method.
iterator
in interface Iterable<Tag>
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |