org.entityfs.util
Class EntityFilters

java.lang.Object
  extended by org.entityfs.util.EntityFilters

public final class EntityFilters
extends Object

This is a utility class with static methods for working with Filter:s for EntityView:s.

Since:
1.0
Author:
Karl Gustafsson
See Also:
Filter
In_jar:
entityfs-util

Method Summary
static Collection<EntityView> filterCollection(Collection<? extends EntityView> c, Filter<? super EntityView> f)
          Filter the elements in the provided Collection through the filter and return all entities that pass it.
static List<EntityView> filterList(List<? extends EntityView> l, Filter<? super EntityView> f)
          Filter the elements in the provided List through the filter and return all entities that pass it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

filterCollection

public static Collection<EntityView> filterCollection(Collection<? extends EntityView> c,
                                                      Filter<? super EntityView> f)
Filter the elements in the provided Collection through the filter and return all entities that pass it.

Parameters:
c - The collection of entities.
f - The filter.
Returns:
All entities that pass the filter.

filterList

public static List<EntityView> filterList(List<? extends EntityView> l,
                                          Filter<? super EntityView> f)
Filter the elements in the provided List through the filter and return all entities that pass it.

Parameters:
l - The list of entities.
f - The filter.
Returns:
A list with all the entities that pass the filter. The entities in the list are ordered in the same order relative to each other as in the provided list.