edu.columbia.cs.ref.model.matcher.impl
Class AndEntityMatcher
java.lang.Object
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
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 |
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
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 entityentity
- the second entity
- Returns:
- true, if the entities match