Package common.types

Interface Filter<T>

All Known Implementing Classes:
MoneroOutputQuery, MoneroTransferQuery, MoneroTxQuery

public interface Filter<T>
Base filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Set<T>
    apply(Filter<? extends T> filter, Set<? extends T> items)
    Returns a new set comprised of elements from the given set that meet the filter's criteria.
    static <T> List<T>
    apply(Filter<T> filter, List<? extends T> items)
    Returns a new list comprised of elements from the given list that meet the filter's criteria.
    boolean
    Indicates if the given item meets the criteria of this filter.
  • Method Details

    • meetsCriteria

      boolean meetsCriteria(T item)
      Indicates if the given item meets the criteria of this filter.
      Parameters:
      item - is the item to test
      Returns:
      true if the item meets the criteria of this filter, false otherwise
    • apply

      static <T> List<T> apply(Filter<T> filter, List<? extends T> items)
      Returns a new list comprised of elements from the given list that meet the filter's criteria.
      Type Parameters:
      T - templated type
      Parameters:
      filter - filters the items
      items - are the items to filter
      Returns:
      the items that meet this filter's criteria
    • apply

      static <T> Set<T> apply(Filter<? extends T> filter, Set<? extends T> items)
      Returns a new set comprised of elements from the given set that meet the filter's criteria.
      Type Parameters:
      T - templated type
      Parameters:
      filter - filters the items
      items - are the items to filter
      Returns:
      the items that meet this filter's criteria