java.lang.Object
java.lang.Record
dev.argon.esexpr.ESExprTagSet.Tags
- Record Components:
- The tags.
- All Implemented Interfaces:
ESExprTagSet
- Enclosing interface:
ESExprTagSet
public static record ESExprTagSet.Tags(com.google.common.collect.ImmutableSet<ESExprTag> tags)
extends Record
implements ESExprTagSet
A finite set of tags.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.argon.esexpr.ESExprTagSet
ESExprTagSet.All, ESExprTagSet.Tags -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a tag set with a new tag added.booleanChecks if the set contains a tag.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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.com.google.common.collect.ImmutableSet<ESExprTag> tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.union(ESExprTagSet other) Creates a tag set with all elements of this and another set.
-
Constructor Details
-
Tags
-
-
Method Details
-
add
Description copied from interface:ESExprTagSetCreates a tag set with a new tag added.- Specified by:
addin interfaceESExprTagSet- Parameters:
tag- The tag to add.- Returns:
- The updated set.
-
union
Description copied from interface:ESExprTagSetCreates a tag set with all elements of this and another set.- Specified by:
unionin interfaceESExprTagSet- Parameters:
other- The other set.- Returns:
- The updated set.
-
isEmpty
public boolean isEmpty()Description copied from interface:ESExprTagSetReturns true iff the set is empty.- Specified by:
isEmptyin interfaceESExprTagSet- Returns:
- true iff the set is empty
-
isAll
public boolean isAll()Description copied from interface:ESExprTagSetReturns true iff this is the set of all tags.- Specified by:
isAllin interfaceESExprTagSet- Returns:
- true iff this is the set of all tags
-
contains
Description copied from interface:ESExprTagSetChecks if the set contains a tag.- Specified by:
containsin interfaceESExprTagSet- Parameters:
tag- The tag to check.- Returns:
- true iff the set contains the tag.
-
isDisjoint
Description copied from interface:ESExprTagSetChecks if sets are disjoint.- Specified by:
isDisjointin interfaceESExprTagSet- Parameters:
other- The other set.- Returns:
- true iff there are no common elements between the sets.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tags
-