Class ArenaConditionGroup
java.lang.Object
de.marcely.bedwars.api.arena.picker.condition.ArenaCondition
de.marcely.bedwars.api.arena.picker.condition.ArenaConditionGroup
A collection that persists of ArenaCondition to which we are applying logical conjunctions.
This ArenaCondition type only does either AND or OR operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the given arena fullfills the conditions or not.booleancheck(RemoteArena arena) Checks whether the given arena fullfills the conditions or not.Gets all childrens that have been aded.booleanisAND()Whether all childrens are being checked using the AND operator.booleanisOR()Whether all childrens are being checked using the OR operator.serialize(boolean isRoot) Serializes a string representation that may as well be used to deserialize/parse it.voidsetAND()Use the AND operator.voidsetOR()Use the OR operator.toString()Methods inherited from class de.marcely.bedwars.api.arena.picker.condition.ArenaCondition
filterLocalArenas, filterRemoteArenas
-
Constructor Details
-
ArenaConditionGroup
public ArenaConditionGroup() -
ArenaConditionGroup
-
-
Method Details
-
getChildrens
Gets all childrens that have been aded.The returned collection is by default fully mutable.
It may not only be in case an immutable type has been passed withArenaConditionGroup(List):- Returns:
- A collection with all the childs added to this group
-
isAND
public boolean isAND()Whether all childrens are being checked using the AND operator.- Returns:
- Whether AND is currently defined as the operator.
trueif it is
-
isOR
public boolean isOR()Whether all childrens are being checked using the OR operator.- Returns:
- Whether OR is currently defined as the operator.
trueif it is
-
setAND
public void setAND()Use the AND operator. -
setOR
public void setOR()Use the OR operator. -
serialize
Serializes a string representation that may as well be used to deserialize/parse it.Root groups use [ ] as their outer brackets, while inner groups use ( )
- Parameters:
isRoot- Whether this group is the root group- Returns:
- A string representation of this group
- See Also:
-
check
Description copied from class:ArenaConditionChecks whether the given arena fullfills the conditions or not.- Specified by:
checkin classArenaCondition- Parameters:
arena- The local arena that is being checked- Returns:
truein case it may pass
-
check
Description copied from class:ArenaConditionChecks whether the given arena fullfills the conditions or not.- Specified by:
checkin classArenaCondition- Parameters:
arena- The remote arena that is being checked- Returns:
truein case it may pass
-
toString
-