public interface TagList extends Iterable<Tag>, Comparable<TagList>
| Modifier and Type | Method and Description |
|---|---|
default int |
compareTo(TagList other) |
static TagList |
create(Iterable<? extends Tag> tags)
Returns a new
TagList containing the given tags. |
static TagList |
create(Map<String,String> tags)
Create a new tag list from a map.
|
static TagList |
empty()
Returns the empty
TagList. |
default TagList |
filter(BiPredicate<String,String> predicate)
Return a new tag list with only tags that match the predicate.
|
default TagList |
filterByKey(Predicate<String> predicate)
Return a new tag list with only tags with keys that match the predicate.
|
default void |
forEach(BiConsumer<String,String> consumer)
Apply the consumer function for each tag in the list.
|
String |
getKey(int i)
Return the key at the specified index.
|
default Tag |
getTag(int i)
Return the tag at the specified index.
|
String |
getValue(int i)
Return the value at the specified index.
|
default Iterator<Tag> |
iterator() |
int |
size()
Return the number of tags in the list.
|
default Spliterator<Tag> |
spliterator() |
static Collector<Tag,?,TagList> |
toTagList()
Returns a
Collector that accumulates the input tags into a new TagList. |
static TagList create(Iterable<? extends Tag> tags)
TagList containing the given tags.NullPointerException - if tags is null or contains a null tagstatic TagList empty()
TagList.static Collector<Tag,?,TagList> toTagList()
Collector that accumulates the input tags into a new TagList.String getKey(int i)
String getValue(int i)
int size()
default Tag getTag(int i)
default TagList filter(BiPredicate<String,String> predicate)
default TagList filterByKey(Predicate<String> predicate)
default void forEach(BiConsumer<String,String> consumer)
default int compareTo(TagList other)
compareTo in interface Comparable<TagList>default Spliterator<Tag> spliterator()
spliterator in interface Iterable<Tag>