Class ConjunctiveFilter

All Implemented Interfaces:
Expression, Filter, LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, DependencyStreamProvider, WhereFilter, Serializable

public class ConjunctiveFilter extends ComposedFilter
See Also:
  • Method Details

    • of

      public static WhereFilter of(FilterAnd ands)
    • of

      public static WhereFilter of(WhereFilter... filters)
    • makeConjunctiveFilter

      public static WhereFilter makeConjunctiveFilter(WhereFilter... componentFilters)
    • filter

      @NotNull public @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev)
      Description copied from interface: WhereFilter
      Filter selection to only matching rows.
      Parameters:
      selection - the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate or close selection.
      fullSet - the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate or close fullSet.
      table - the table to filter
      usePrev - true if previous values should be used. Implementing previous value filtering is optional, and a WhereFilter.PreviousFilteringNotSupported exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.
      Returns:
      The subset of selection accepted by this filter; ownership passes to the caller
    • filterInverse

      @NotNull public @NotNull WritableRowSet filterInverse(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev)
      Description copied from interface: WhereFilter
      Filter selection to only non-matching rows.

      Defaults to

       
       try (final WritableRowSet regular = filter(selection, fullSet, table, usePrev)) {
           return selection.minus(regular);
       }
       
       

      Implementations are encouraged to override this when they can provide more efficient implementations.

      Parameters:
      selection - the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate or close selection.
      fullSet - the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate or close fullSet.
      table - the table to filter
      usePrev - true if previous values should be used. Implementing previous value filtering is optional, and a WhereFilter.PreviousFilteringNotSupported exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.
      Returns:
      The subset of selection not accepted by this filter; ownership passes to the caller
    • copy

      public ConjunctiveFilter copy()
      Description copied from interface: WhereFilter
      Create a copy of this WhereFilter.
      Returns:
      an independent copy of this WhereFilter.
    • toString

      public String toString()
      Overrides:
      toString in class ReferenceCounted