public final class SortedTagList extends java.lang.Object implements TagList
TagList
backed by a SortedMap
.
Prefer the more efficient BasicTagList
implementation which
also provides an asMap
method that returns a sorted map of tags.Modifier and Type | Class and Description |
---|---|
static class |
SortedTagList.Builder
Helper class to construct
SortedTagList objects. |
Modifier and Type | Field and Description |
---|---|
static SortedTagList |
EMPTY
An empty
SortedTagList . |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
asMap()
Returns a map containing a copy of the tags in this list.
|
static SortedTagList.Builder |
builder()
Get a new
SortedTagList.Builder . |
boolean |
containsKey(java.lang.String key)
Returns true if this list has a tag with the given key.
|
boolean |
equals(java.lang.Object obj) |
Tag |
getTag(java.lang.String key)
Returns the tag matching a given key or null if not match is found.
|
java.lang.String |
getValue(java.lang.String key)
Returns the value matching a given key or null if not match is found.
|
int |
hashCode() |
boolean |
isEmpty()
Returns true if this list is emtpy.
|
java.util.Iterator<Tag> |
iterator() |
int |
size()
Returns the number of tags in this list.
|
java.lang.String |
toString() |
public static final SortedTagList EMPTY
SortedTagList
.public Tag getTag(java.lang.String key)
public java.lang.String getValue(java.lang.String key)
public boolean containsKey(java.lang.String key)
containsKey
in interface TagList
public boolean isEmpty()
public int size()
public java.util.Iterator<Tag> iterator()
public java.util.Map<java.lang.String,java.lang.String> asMap()
public static SortedTagList.Builder builder()
SortedTagList.Builder
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object