games.strategy.util
Class CompositeMatchOr<T>

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

public class CompositeMatchOr<T>
extends CompositeMatch<T>

True if one match returns true.

Version:
1.0
Author:
Sean Bridges

Field Summary
 
Fields inherited from class games.strategy.util.Match
ALWAYS_MATCH, NEVER_MATCH
 
Constructor Summary
CompositeMatchOr(java.util.Collection<Match<T>> matches)
           
CompositeMatchOr(Match... matches)
          Creates new CompositeMatchOr
 
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

CompositeMatchOr

public CompositeMatchOr(Match... matches)
Creates new CompositeMatchOr


CompositeMatchOr

public CompositeMatchOr(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>