- All Known Implementing Classes:
ESExprTagSet.All,ESExprTagSet.Tags
Represents a set of expression tags.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA set of all tags.static final recordA finite set of tags. -
Method Summary
Modifier and TypeMethodDescriptionCreates a tag set with a new tag added.booleanChecks if the set contains a tag.booleanisAll()Returns true iff this is the set of all tags.booleanisDisjoint(ESExprTagSet other) Checks if sets are disjoint.booleanisEmpty()Returns true iff the set is empty.static ESExprTagSetCreates an instance ofESExprTagSetfrom the given tags.union(ESExprTagSet other) Creates a tag set with all elements of this and another set.
-
Method Details
-
of
Creates an instance ofESExprTagSetfrom the given tags.- Parameters:
tags- The array ofESExprTagelements to include in the set.- Returns:
- A
ESExprTagSetcontaining the specified tags.
-
add
Creates a tag set with a new tag added.- Parameters:
tag- The tag to add.- Returns:
- The updated set.
-
union
Creates a tag set with all elements of this and another set.- Parameters:
other- The other set.- Returns:
- The updated set.
-
isEmpty
boolean isEmpty()Returns true iff the set is empty.- Returns:
- true iff the set is empty
-
isAll
boolean isAll()Returns true iff this is the set of all tags.- Returns:
- true iff this is the set of all tags
-
contains
Checks if the set contains a tag.- Parameters:
tag- The tag to check.- Returns:
- true iff the set contains the tag.
-
isDisjoint
Checks if sets are disjoint.- Parameters:
other- The other set.- Returns:
- true iff there are no common elements between the sets.
-