edu.columbia.cs.ref.model.matcher.impl
Class OrEntityMatcher

java.lang.Object
  extended by edu.columbia.cs.ref.model.matcher.impl.OrEntityMatcher
All Implemented Interfaces:
EntityMatcher, java.io.Serializable

public class OrEntityMatcher
extends java.lang.Object
implements EntityMatcher

The Class OrEntityMatcher is an implementation of EntityMatcher that is used to compose several other matchers. This constraint checks if the entities passed as input match using at least one of the matchers passed as input to the constructor check

Since:
2011-09-27
Version:
0.1
Author:
Pablo Barrio, Goncalo Simoes
See Also:
Serialized Form

Constructor Summary
OrEntityMatcher(EntityMatcher... entityMatchers)
          Instantiates a new or entity matcher.
 
Method Summary
 boolean match(Entity original, Entity entity)
          Determines if the two input entities match
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrEntityMatcher

public OrEntityMatcher(EntityMatcher... entityMatchers)
Instantiates a new or entity matcher. It receives an undefined number of matchers that must be used in the matching.

Parameters:
entityMatchers - the entity matchers
Method Detail

match

public boolean match(Entity original,
                     Entity entity)
Description copied from interface: EntityMatcher
Determines if the two input entities match

Specified by:
match in interface EntityMatcher
Parameters:
original - the first entity
entity - the second entity
Returns:
true, if the entities match