public class TagUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
containsTag(Taggable taggable,
String tag)
Returns
true if the given tag is found within the taggable object (e.g. |
static boolean |
doesNotContainTag(Taggable taggable,
String tag) |
static List<String> |
getExcludedTags(Taggable taggable,
String tagPrefix)
Filters the given taggable object for tags NOT having a specific prefix.
|
static List<String> |
getFilteredTags(Taggable taggable,
Predicate<String> filter)
Returns a filtered list of tags from the given taggable object based on a provided filter function.
|
static List<String> |
getFilteredTags(Taggable taggable,
String tagPrefix)
Filters the given taggable object for tags having a specific prefix.
|
public static boolean containsTag(Taggable taggable, String tag)
true
if the given tag is found within the taggable object (e.g. a conversation or engagement
data object), false
if there are no tags at all or if the specified one was not found.taggable
- the taggable object (e.g. a conversation or message object)tag
- the tag to be searchedtrue
if that tag is foundpublic static List<String> getFilteredTags(Taggable taggable, String tagPrefix)
taggable
- the taggable object to return filtered tags fortagPrefix
- the prefix of the tags to be returnednull
public static List<String> getExcludedTags(Taggable taggable, String tagPrefix)
taggable
- the taggable objet to return filtered tags fortagPrefix
- the prefix of the tags NOT to be returnednull
public static List<String> getFilteredTags(Taggable taggable, Predicate<String> filter)
taggable
- the taggable object to return filtered tags forfilter
- the filter function to test for tags to include in the filtered listnull
Copyright © 2019. All rights reserved.