Class GroupsSelector
This class is a tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isAbc()
methods will return true. You can use tag() to determine the
tag associated with this instance.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanList of external IDs of groups.List of group IDs.static GroupsSelectorgroupExternalIds(List<String> value) Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS.static GroupsSelectorReturns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_IDS.inthashCode()booleanbooleantag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Method Details
-
tag
Returns the tag for this instance.This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of the
isXyz()methods will returntrue. Callers are recommended to use the tag value in aswitchstatement to properly handle the different values for thisGroupsSelector.- Returns:
- the tag for this instance.
-
isGroupIds
public boolean isGroupIds()- Returns:
trueif this instance is tagged asGroupsSelector.Tag.GROUP_IDS,falseotherwise.
-
groupIds
Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_IDS.List of group IDs.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
GroupsSelectorwith its tag set toGroupsSelector.Tag.GROUP_IDS. - Throws:
IllegalArgumentException- ifvaluecontains anullitem or isnull.
-
getGroupIdsValue
List of group IDs.This instance must be tagged as
GroupsSelector.Tag.GROUP_IDS.- Returns:
- The
Listvalue associated with this instance ifisGroupIds()istrue. - Throws:
IllegalStateException- IfisGroupIds()isfalse.
-
isGroupExternalIds
public boolean isGroupExternalIds()- Returns:
trueif this instance is tagged asGroupsSelector.Tag.GROUP_EXTERNAL_IDS,falseotherwise.
-
groupExternalIds
Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS.List of external IDs of groups.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
GroupsSelectorwith its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS. - Throws:
IllegalArgumentException- ifvaluecontains anullitem or isnull.
-
getGroupExternalIdsValue
List of external IDs of groups.This instance must be tagged as
GroupsSelector.Tag.GROUP_EXTERNAL_IDS.- Returns:
- The
Listvalue associated with this instance ifisGroupExternalIds()istrue. - Throws:
IllegalStateException- IfisGroupExternalIds()isfalse.
-
hashCode
public int hashCode() -
equals
-
toString
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-