com.opttek.optquest
Class COptQuestOrRequirement

java.lang.Object
  extended bycom.opttek.optquest.COptQuestOrRequirement

public class COptQuestOrRequirement
extends java.lang.Object

The COptQuestOrRequirement class allows you to define a logical "or" relationship among COptQuestRequirement objects. Any number of COptQuestRequirement objects can be added to the COptQuestOrRequirement object.

The COptQuestRequirement objects are added to the the COptQuestOrRequirement object, and the COptQuestOrRequirement object is added to the COptQuestOptimization object using the COptQuestOptimization::AddRequirement() method.


Constructor Summary
COptQuestOrRequirement()
          Default constructor
COptQuestOrRequirement(java.lang.String name)
          Constructor that assigns a name to the COptQuestOrRequirement
 
Method Summary
 void AddRequirement(COptQuestRequirement requirement)
          Adds a COptQuestRequirement object to the COptQuestOrRequirement.
 java.lang.String GetName()
          Returns the name assigned to the COptQuestOrRequirement.
 int GetNumberOfRequirements()
          Returns the number of COptQuestRequirement objects that were added by calls to COptQuestOrRequirement::AddRequirement().
 COptQuestRequirement GetRequirementAt(int index)
          Returns the COptQuestRequirement object at the specified index.
 void SetName(java.lang.String value)
          Assigns a name to the COptQuestOrRequirement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestOrRequirement

public COptQuestOrRequirement(java.lang.String name)
Constructor that assigns a name to the COptQuestOrRequirement

Parameters:
name - alphanumeric name

COptQuestOrRequirement

public COptQuestOrRequirement()
Default constructor

Method Detail

SetName

public void SetName(java.lang.String value)
Assigns a name to the COptQuestOrRequirement

Parameters:
value - alphanumeric name

GetName

public java.lang.String GetName()
Returns the name assigned to the COptQuestOrRequirement.

Returns:
alphanumeric name

AddRequirement

public void AddRequirement(COptQuestRequirement requirement)
Adds a COptQuestRequirement object to the COptQuestOrRequirement. COptQuestRequirement objects are added to the COptQuestOrRequirement and then the COptQuestOrRequirement object is added to the COptQuestOptimization object. The COptQuestOrRequirement is true (feasible)if Requirement1 or Requirement2 … or RequirementN is true.

Parameters:
requirement - COptQuestRequirement object.

GetNumberOfRequirements

public int GetNumberOfRequirements()
Returns the number of COptQuestRequirement objects that were added by calls to COptQuestOrRequirement::AddRequirement().

Returns:
the number of COptQuestRequirement objects in the COptQuestOrRequirement.

GetRequirementAt

public COptQuestRequirement GetRequirementAt(int index)
Returns the COptQuestRequirement object at the specified index.

Parameters:
index - 0 based index
Returns:
- COptQuestRequirement object at the specified index