org.opt4j.core.config
Class EnumRequirement

java.lang.Object
  extended by org.opt4j.core.config.EnumRequirement
All Implemented Interfaces:
Requirement

public class EnumRequirement
extends java.lang.Object
implements Requirement

The EnumRequirement is a Requirement that depends on a enumeration valued Property.


Constructor Summary
EnumRequirement(Property property, java.util.Collection<java.lang.Object> elements)
          Constructs a EnumRequirement.
 
Method Summary
 Property getProperty()
          Returns the property of the requirement.
 boolean isFulfilled()
          Returns true if the requirement is fulfilled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumRequirement

public EnumRequirement(Property property,
                       java.util.Collection<java.lang.Object> elements)
Constructs a EnumRequirement.

Parameters:
property - the monitored property
elements - the allowed elements
Method Detail

getProperty

public Property getProperty()
Description copied from interface: Requirement
Returns the property of the requirement.

Specified by:
getProperty in interface Requirement
Returns:
the property of the requirement

isFulfilled

public boolean isFulfilled()
Description copied from interface: Requirement
Returns true if the requirement is fulfilled.

Specified by:
isFulfilled in interface Requirement
Returns:
true if the requirement is fulfilled