Class AggregateFluidFilter
java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.AggregateFluidFilter
- All Implemented Interfaces:
FluidFilter
,ReadableFluidFilter
,Iterable<FluidFilter>
public class AggregateFluidFilter
extends Object
implements ReadableFluidFilter, Iterable<FluidFilter>
An
FluidFilter
over a predefined array of FluidFilter
's. You can either iterate over this object
directly or use getFilterCount()
and getFilter(int)
to read every filter individually.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FluidFilter
allOf(FluidFilter... filters)
static FluidFilter
allOf(List<? extends FluidFilter> filters)
static FluidFilter
and(FluidFilter filterA, FluidFilter filterB)
static FluidFilter
anyOf(FluidFilter... filters)
static FluidFilter
anyOf(List<? extends FluidFilter> filters)
static FluidFilter
combine(AggregateFilterType type, FluidFilter... filters)
static FluidFilter
combine(AggregateFilterType type, FluidFilter filterA, FluidFilter filterB)
static FluidFilter
combine(AggregateFilterType type, List<? extends FluidFilter> filters)
getFilter(int index)
int
iterator()
boolean
Checks to see if the given filter matches the given fluid key.static FluidFilter
or(FluidFilter filterA, FluidFilter filterB)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface alexiil.mc.lib.attributes.fluid.filter.FluidFilter
and, asPredicate, negate, or
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
type
-
-
Constructor Details
-
AggregateFluidFilter
-
-
Method Details
-
and
- Returns:
- An
AggregateFluidFilter
that contains both of the given filters. This might not return a new object if either of the filters contains the other.
-
or
- Returns:
- An
AggregateFluidFilter
that contains both of the given filters. This might not return a new object if either of the filters contains the other.
-
combine
public static FluidFilter combine(AggregateFilterType type, FluidFilter filterA, FluidFilter filterB) -
allOf
-
anyOf
-
combine
-
allOf
-
anyOf
-
combine
-
matches
Description copied from interface:FluidFilter
Checks to see if the given filter matches the given fluid key.- Specified by:
matches
in interfaceFluidFilter
-
getFilterCount
public int getFilterCount() -
getFilter
-
iterator
- Specified by:
iterator
in interfaceIterable<FluidFilter>
-