public class TagTypeSet extends java.util.AbstractSet<Tag> implements java.io.Serializable
Set
implementation for Tag
. A tag set will allow
multiple tags of the same type as long as none of them are considered equal. It is possible to
query and remove tags by type as well as by instance.Object.equals(Object)
,
Object.hashCode()
,
Serialized FormConstructor and Description |
---|
TagTypeSet()
Creates a new instance of tag set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Tag e) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsOfType(java.lang.Class<? extends Tag> type)
Checks whether the tag set contains any tags of that type.
|
<T extends Tag> |
getOfType(java.lang.Class<T> type)
Gets all of the tags matching the specified type.
|
boolean |
isEmpty() |
java.util.Iterator<Tag> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeOfType(java.lang.Class<? extends Tag> type)
Removes all tags of the specified type.
|
int |
size() |
addAll, containsAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public boolean add(Tag e)
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsOfType(java.lang.Class<? extends Tag> type)
type
- Type of tag.true
if the set contains any tags of the specified type or false
if
it does not.public <T extends Tag> java.util.Set<T> getOfType(java.lang.Class<T> type)
type
- Type of tag.public boolean isEmpty()
public java.util.Iterator<Tag> iterator()
public boolean remove(java.lang.Object o)
public boolean removeOfType(java.lang.Class<? extends Tag> type)
type
- Type of tag.