games.strategy.util
Class CompositeMatchAnd<T>

java.lang.Object
  extended by games.strategy.util.Match<T>
      extended by games.strategy.util.CompositeMatch<T>
          extended by games.strategy.util.CompositeMatchAnd<T>

public class CompositeMatchAnd<T>
extends CompositeMatch<T>

True if all matches return true.

Author:
Sean Bridges

Field Summary
 
Fields inherited from class games.strategy.util.Match
ALWAYS_MATCH, NEVER_MATCH
 
Constructor Summary
CompositeMatchAnd(java.util.Collection<Match<T>> matches)
           
CompositeMatchAnd(Match... matches)
           
 
Method Summary
 boolean match(T o)
          Subclasses must override this method.
 
Methods inherited from class games.strategy.util.CompositeMatch
add, addInverse, getMatches
 
Methods inherited from class games.strategy.util.Match
allMatch, countMatches, getKeysWhereValueMatch, getMatches, getNMatches, invert, noneMatch, someMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeMatchAnd

public CompositeMatchAnd(Match... matches)

CompositeMatchAnd

public CompositeMatchAnd(java.util.Collection<Match<T>> matches)
Method Detail

match

public boolean match(T o)
Description copied from class: Match
Subclasses must override this method. Returns true if the object matches some condition.

Specified by:
match in class Match<T>