Class Filter


  • public class Filter
    extends java.lang.Object
    Deprecated.
    Use a for with an if to filter the collection
    Filter a collection of Filterable objects, by name|value of their custom fields.

    The filter just stores getFilterMode() and getKeyValueFilters(). You can instance a filter, specifying how to filter, and reuse it to filter multiple collections.

    See Also:
    Filter.FilterMode, Filter.KeyValueFilter
    • Constructor Detail

      • Filter

        public Filter​(Filter.FilterMode filterMode,
                      java.util.Collection<Filter.KeyValueFilter> keyValueFilters)
        Deprecated.
        Parameters:
        filterMode - can't be null
        keyValueFilters - can't be null
        Throws:
        java.lang.NullPointerException - if some parameter is null
    • Method Detail

      • getKeyValueFilters

        public java.util.Collection<Filter.KeyValueFilter> getKeyValueFilters()
        Deprecated.
      • filter

        public <T extends Filterable> java.util.ArrayList<T> filter​(java.util.Collection<T> toFilter)
        Deprecated.
        Filter the passed list of items using the stored filters.
        Parameters:
        toFilter - element to filter. Is not altered.
        Returns:
        new list with the resulting filtered items. Provided list is not altered.
        Throws:
        java.lang.NullPointerException - if some parameter is null