Class Tags
- java.lang.Object
-
- org.forgerock.monitoring.api.instrument.Tags
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tags
and(Iterable<? extends Tag> tags)
Return a newTags
instance my merging this collection and the specific tags.Tags
and(String... keyValues)
Return a newTags
instance my merging this collection and the specific key/value pairs.Tags
and(String key, String value)
Return a newTags
instance my merging this collection and the specific key/value pair.Tags
and(Tag... tags)
Return a newTags
instance my merging this collection and the specific tags.static Tags
concat(Iterable<? extends Tag> tags, Iterable<Tag> otherTags)
Return a newTags
instance my concatenating the specified values.static Tags
concat(Iterable<? extends Tag> tags, String... keyValues)
Return a newTags
instance my concatenating the specified key value pairs.static Tags
empty()
Return aTags
instance that contains no elements.boolean
equals(Object obj)
int
hashCode()
Iterator<Tag>
iterator()
static Tags
of(Iterable<? extends Tag> tags)
Return a newTags
instance containing tags constructed from the specified source tags.static Tags
of(String... keyValues)
Return a newTags
instance containing tags constructed from the specified key value pairs.static Tags
of(String key, String value)
Return a newTags
instance containing tags constructed from the specified name value pair.static Tags
of(Tag... tags)
Return a newTags
instance containing tags constructed from the specified tags.Stream<Tag>
stream()
Return a stream of the contained tags.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
and
public Tags and(String key, String value)
Return a newTags
instance my merging this collection and the specific key/value pair.- Parameters:
key
- the tag key to addvalue
- the tag value add- Returns:
- a new
Tags
instance
-
and
public Tags and(@Nullable String... keyValues)
Return a newTags
instance my merging this collection and the specific key/value pairs.- Parameters:
keyValues
- the key value pairs to add- Returns:
- a new
Tags
instance
-
and
public Tags and(@Nullable Tag... tags)
Return a newTags
instance my merging this collection and the specific tags.- Parameters:
tags
- the tags to add- Returns:
- a new
Tags
instance
-
and
public Tags and(@Nullable Iterable<? extends Tag> tags)
Return a newTags
instance my merging this collection and the specific tags.- Parameters:
tags
- the tags to add- Returns:
- a new
Tags
instance
-
concat
public static Tags concat(Iterable<? extends Tag> tags, Iterable<Tag> otherTags)
Return a newTags
instance my concatenating the specified values.- Parameters:
tags
- the first set of tagsotherTags
- the second set of tags- Returns:
- the merged tags
-
concat
public static Tags concat(Iterable<? extends Tag> tags, String... keyValues)
Return a newTags
instance my concatenating the specified key value pairs.- Parameters:
tags
- the first set of tagskeyValues
- the additional key value pairs to add- Returns:
- the merged tags
-
of
public static Tags of(Iterable<? extends Tag> tags)
Return a newTags
instance containing tags constructed from the specified source tags.- Parameters:
tags
- the tags to add- Returns:
- a new
Tags
instance
-
of
public static Tags of(String key, String value)
Return a newTags
instance containing tags constructed from the specified name value pair.- Parameters:
key
- the tag key to addvalue
- the tag value to add- Returns:
- a new
Tags
instance
-
of
public static Tags of(String... keyValues)
Return a newTags
instance containing tags constructed from the specified key value pairs.- Parameters:
keyValues
- the key value pairs to add- Returns:
- a new
Tags
instance
-
of
public static Tags of(Tag... tags)
Return a newTags
instance containing tags constructed from the specified tags.- Parameters:
tags
- the tags to add- Returns:
- a new
Tags
instance
-
-