org.linkedin.glu.utils.tags
Interface ReadOnlyTaggeable
- All Known Subinterfaces:
- Taggeable
- All Known Implementing Classes:
- FilteredTaggeable, TaggeableHashSetImpl, TaggeableSetImpl, TaggeableTreeSetImpl
public interface ReadOnlyTaggeable
Defines an entity that is taggeable. A tag is just a string. A taggeable entity can have an
unlimited number of tags.
|
Method Summary |
java.util.Set<java.lang.String> |
getCommonTags(java.util.Collection<java.lang.String> tags)
|
java.util.Set<java.lang.String> |
getMissingTags(java.util.Collection<java.lang.String> tags)
|
java.util.Set<java.lang.String> |
getTags()
|
int |
getTagsCount()
|
boolean |
hasAllTags(java.util.Collection<java.lang.String> tags)
|
boolean |
hasAnyTag(java.util.Collection<java.lang.String> tags)
|
boolean |
hasTag(java.lang.String tag)
|
boolean |
hasTags()
|
EMPTY
static final ReadOnlyTaggeable EMPTY
getTagsCount
int getTagsCount()
- Returns:
- the number of tags
hasTags
boolean hasTags()
- Returns:
true if there are no tags
getTags
java.util.Set<java.lang.String> getTags()
- Returns:
- the set of all tags
hasTag
boolean hasTag(java.lang.String tag)
- Returns:
true if the given tag is present
hasAllTags
boolean hasAllTags(java.util.Collection<java.lang.String> tags)
- Returns:
true if the given tags are present (all of them)
hasAnyTag
boolean hasAnyTag(java.util.Collection<java.lang.String> tags)
- Returns:
true if at least one of them is present
getCommonTags
java.util.Set<java.lang.String> getCommonTags(java.util.Collection<java.lang.String> tags)
- Returns:
- a subset of the provided tags containing all the tags that are present in this object.
(intersection)
getMissingTags
java.util.Set<java.lang.String> getMissingTags(java.util.Collection<java.lang.String> tags)
- Returns:
- a subset of the provided tags containing all the tags that are not present in
this object. (difference)