Class Filter<T>

java.lang.Object
net.fortuna.ical4j.filter.Filter<T>

@Deprecated public class Filter<T> extends Object
Deprecated.
Most of the functionality of this class can now be achieved via lambda expressions using Component Filters
$Id$

Created: Feb 1, 2006

Performs collection filtering based on a set of rules. A filter may dictate whether at least one rule or all rules are matched.

NOTE: Implementation of filter rules has changed in recent releases to fix behaviour. Please ensure you update your code to use explicit constructors.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated.
    Indicates that all rules must be matched to include an object in the filtered collection.
    static final int
    Deprecated.
    Indicates that any rule may be matched to include an object in the filtered collection.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Filter(Predicate<T>... rules)
    Deprecated.
     
    Filter(Predicate<T>[] rules, int type)
    Deprecated.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final Collection<T>
    Deprecated.
    Filter the given collection into a new collection.
    final T[]
    filter(T[] objects)
    Deprecated.
    Returns a filtered subset of the specified array.
    final Predicate<T>[]
    Deprecated.
     
    final void
    setRules(Predicate<T>[] rules)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MATCH_ANY

      public static final int MATCH_ANY
      Deprecated.
      Indicates that any rule may be matched to include an object in the filtered collection.
      See Also:
    • MATCH_ALL

      public static final int MATCH_ALL
      Deprecated.
      Indicates that all rules must be matched to include an object in the filtered collection.
      See Also:
  • Constructor Details

    • Filter

      @SafeVarargs public Filter(Predicate<T>... rules)
      Deprecated.
      Parameters:
      rules - one or more rules that are applied by this filter
    • Filter

      public Filter(Predicate<T>[] rules, int type)
      Deprecated.
      Constructor.
      Parameters:
      rules - an array of rules that define this filter
      type - the type of matching to apply
      See Also:
  • Method Details

    • filter

      public final Collection<T> filter(Collection<T> c)
      Deprecated.
      Filter the given collection into a new collection.
      Parameters:
      c - a collection to filter
      Returns:
      a filtered collection
    • filter

      public final T[] filter(T[] objects)
      Deprecated.
      Returns a filtered subset of the specified array.
      Parameters:
      objects - an array to filter
      Returns:
      a filtered array
    • getRules

      public final Predicate<T>[] getRules()
      Deprecated.
      Returns:
      Returns the rules.
    • setRules

      public final void setRules(Predicate<T>[] rules)
      Deprecated.
      Parameters:
      rules - The rules to set.