Class AggregateFluidFilter
java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.AggregateFluidFilter
- All Implemented Interfaces:
FluidFilter,ReadableFluidFilter,java.lang.Iterable<FluidFilter>
public class AggregateFluidFilter extends java.lang.Object implements ReadableFluidFilter, java.lang.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
Fields Modifier and Type Field Description AggregateFilterTypetype -
Constructor Summary
Constructors Constructor Description AggregateFluidFilter(AggregateFilterType type, FluidFilter... filters) -
Method Summary
Modifier and Type Method Description static FluidFilterallOf(FluidFilter... filters)static FluidFilterallOf(java.util.List<? extends FluidFilter> filters)static FluidFilterand(FluidFilter filterA, FluidFilter filterB)static FluidFilteranyOf(FluidFilter... filters)static FluidFilteranyOf(java.util.List<? extends FluidFilter> filters)static FluidFiltercombine(AggregateFilterType type, FluidFilter... filters)static FluidFiltercombine(AggregateFilterType type, FluidFilter filterA, FluidFilter filterB)static FluidFiltercombine(AggregateFilterType type, java.util.List<? extends FluidFilter> filters)FluidFiltergetFilter(int index)intgetFilterCount()java.util.Iterator<FluidFilter>iterator()booleanmatches(FluidKey fluid)Checks to see if the given filter matches the given fluid key.static FluidFilteror(FluidFilter filterA, FluidFilter filterB)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.fluid.filter.FluidFilter
and, asPredicate, negate, or
-
Field Details
-
Constructor Details
-
Method Details
-
and
- Returns:
- An
AggregateFluidFilterthat contains both of the given filters. This might not return a new object if either of the filters contains the other.
-
or
- Returns:
- An
AggregateFluidFilterthat 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
public static FluidFilter combine(AggregateFilterType type, java.util.List<? extends FluidFilter> filters) -
matches
Description copied from interface:FluidFilterChecks to see if the given filter matches the given fluid key.- Specified by:
matchesin interfaceFluidFilter
-
getFilterCount
public int getFilterCount() -
getFilter
-
iterator
- Specified by:
iteratorin interfacejava.lang.Iterable<FluidFilter>
-