Class Or
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.PositionBasedFilter
,java.util.function.Predicate
,kotlin.Function
,kotlin.Function1
public final class Or<P extends Position<P>> implements PositionBasedFilter<P>
Check if either positionBasedFilterA or positionBasedFilterB is satisfied.
-
-
Field Summary
Fields Modifier and Type Field Description private final PositionBasedFilter<P>
positionBasedFilterA
private final PositionBasedFilter<P>
positionBasedFilterB
-
Constructor Summary
Constructors Constructor Description Or(PositionBasedFilter<P> positionBasedFilterA, PositionBasedFilter<P> positionBasedFilterB)
-
Method Summary
Modifier and Type Method Description final PositionBasedFilter<P>
getPositionBasedFilterA()
final PositionBasedFilter<P>
getPositionBasedFilterB()
Boolean
contains(P position)
Returns true if either positionBasedFilterA or positionBasedFilterB are satisfied. -
-
Constructor Detail
-
Or
Or(PositionBasedFilter<P> positionBasedFilterA, PositionBasedFilter<P> positionBasedFilterB)
- Parameters:
positionBasedFilterA
- the first filter.positionBasedFilterB
- the second filter.
-
-
Method Detail
-
getPositionBasedFilterA
final PositionBasedFilter<P> getPositionBasedFilterA()
-
getPositionBasedFilterB
final PositionBasedFilter<P> getPositionBasedFilterB()
-
contains
Boolean contains(P position)
Returns true if either positionBasedFilterA or positionBasedFilterB are satisfied.
-
-
-
-