Class ClassFilterSet<E,F extends E>

Type Parameters:
E - Superset's type e.g. BioPAXElement
F - Subset's type e.g. Protein. F must extend E
All Implemented Interfaces:
Iterable<F>, Collection<F>, Set<F>, Filter<E>

public class ClassFilterSet<E,F extends E> extends AbstractFilterSet<E,F>
A FilterSet that filters based on the class. For example, it is useful for creating a Set of Proteins from a Set of BioPAXElements.
  • Field Details

    • filterClass

      protected Class<F extends E> filterClass
  • Constructor Details

    • ClassFilterSet

      public ClassFilterSet(Set<? extends E> baseSet, Class<F> filterClass)
  • Method Details

    • filter

      public boolean filter(E value)
      This filter method implementation filters based on isInstance function.
      Parameters:
      value - Object to be tested
      Returns:
      true if value is instance of F.