T
- Type of the entity to match.public abstract class Matcher<T> extends Object
Constructor and Description |
---|
Matcher() |
Modifier and Type | Method and Description |
---|---|
Collection<T> |
filter(Collection<T> entities)
Method to filter a given collection for matching elements.
|
void |
markMatching(Collection<T> entities)
Marks all matched entities as matched.
|
abstract boolean |
matches(T entity)
Method to check an entity.
|
public Collection<T> filter(Collection<T> entities)
entities
- The entities to filter.public void markMatching(Collection<T> entities)
Note: The entities must implement the Matchable
interface, else this method
will immediately return.
entities
- Entities to mark.public abstract boolean matches(T entity)
entity
- The entity to match.True
, if the entity matches, else false.Copyright © 2019 Communote team. All rights reserved.