Class PositionedAddonsNetworkIngredientsFilter<T>

java.lang.Object
org.cyclops.integrateddynamics.api.network.PositionedAddonsNetworkIngredientsFilter<T>

public class PositionedAddonsNetworkIngredientsFilter<T> extends Object
A data object for filter predicates for ingredient networks with their settings.
  • Constructor Details

    • PositionedAddonsNetworkIngredientsFilter

      public PositionedAddonsNetworkIngredientsFilter(Predicate<T> filter, boolean applyToInsertions, boolean applyToExtractions, boolean allowAllIfFilterNotApplied)
  • Method Details

    • testInsertion

      public boolean testInsertion(T ingredient)
      Test the given ingredient for an insertion operation.
      Parameters:
      ingredient - An ingredient to test.
      Returns:
      If the operation is allowed.
    • testExtraction

      public boolean testExtraction(T ingredient)
      Test the given ingredient for an insertion operation.
      Parameters:
      ingredient - An ingredient to test.
      Returns:
      If the operation is allowed.
    • testView

      public boolean testView(T ingredient)
      Test the given ingredient for read-only and iteration operations.
      Parameters:
      ingredient - An ingredient to test.
      Returns:
      If the operation is allowed.
    • getFilter

      public Predicate<T> getFilter()
      Returns:
      The ingredient filter
    • isApplyToInsertions

      public boolean isApplyToInsertions()
      Returns:
      If the ingredient filter should be used for insertions.
    • isApplyToExtractions

      public boolean isApplyToExtractions()
      Returns:
      If the ingredient filter should be used for extractions.
    • isAllowAllIfFilterNotApplied

      public boolean isAllowAllIfFilterNotApplied()
      Returns:
      Determines what to do if insertion or extraction application is disabled. If this method returns true, then all insertions and/or extractions will be allowed when their respective application is disabled. If this method returns false, then no insertions and/or extractions will be allowed when their respective application is disabled.