edu.columbia.cs.ref.model.constraint.role.impl
Class IsOptionalConstraint
java.lang.Object
edu.columbia.cs.ref.model.constraint.role.impl.IsOptionalConstraint
- All Implemented Interfaces:
- RoleConstraint, java.io.Serializable
public class IsOptionalConstraint
- extends java.lang.Object
- implements RoleConstraint
The Class IsOptionalConstraint is an implementation of the RoleConstraint that
indicates that an entity for a particular role is optional.
- Since:
- 2011-09-27
- Version:
- 0.1
- Author:
- Pablo Barrio, Goncalo Simoes
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IsOptionalConstraint
public IsOptionalConstraint()
checkConstraint
public boolean checkConstraint(Entity role)
- Description copied from interface:
RoleConstraint
- Check check if the input entity fulfills the constraint
- Specified by:
checkConstraint
in interface RoleConstraint
- Parameters:
role
- the entity
- Returns:
- true, if successful
getCompatibleEntities
public java.util.Set<Entity> getCompatibleEntities(java.util.Set<Entity> entities)
- Description copied from interface:
RoleConstraint
- Returns the subset of all the input entities that fulfill the constraint
- Specified by:
getCompatibleEntities
in interface RoleConstraint
- Parameters:
entities
- the entities to be checked
- Returns:
- the compatible entities