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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the given arena fullfills the conditions or not.boolean
check
(RemoteArena arena) Checks whether the given arena fullfills the conditions or not.Gets all childrens that have been aded.boolean
isAND()
Whether all childrens are being checked using the AND operator.boolean
isOR()
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.void
setAND()
Use the AND operator.void
setOR()
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.
true
if 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.
true
if 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:ArenaCondition
Checks whether the given arena fullfills the conditions or not.- Specified by:
check
in classArenaCondition
- Parameters:
arena
- The local arena that is being checked- Returns:
true
in case it may pass
-
check
Description copied from class:ArenaCondition
Checks whether the given arena fullfills the conditions or not.- Specified by:
check
in classArenaCondition
- Parameters:
arena
- The remote arena that is being checked- Returns:
true
in case it may pass
-
toString
-