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

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

public class AndEntityMatcher
extends java.lang.Object
implements EntityMatcher

The Class AndEntityMatcher is an implementation of EntityMatcher that is used to compose several other matchers. This constraint checks if the entities passed as input match using all 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
AndEntityMatcher(EntityMatcher... entityMatchers)
          Instantiates a new and 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

AndEntityMatcher

public AndEntityMatcher(EntityMatcher... entityMatchers)
Instantiates a new and 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