crn
Class IE

java.lang.Object
  extended bycrn.IE

public class IE
extends java.lang.Object

The Information Entity.

Author:
Piotrek

Field Summary
private  java.util.ArrayList caseReferences
          The list of all cases this IE reference to.
 java.lang.String name
          The name of the value held in this IE instance.
 java.lang.String value
          The value of this IE.
 
Constructor Summary
IE(IE other)
          Copy constructor.
IE(java.lang.String name, java.lang.String value)
          Constructor.
 
Method Summary
 void AddCaseReference(Case travelCase)
          Adds a case reference to this IE.
 boolean ContainsCase(Case travelCase)
          Check if there is a given case on the list of references of this IE.
 boolean equals(java.lang.Object object)
           
 int GetCaseReferencesCount()
          Gets the count of the case references of this IE.
 java.util.Iterator GetCaseReferencesInterator()
          Gets the interator for the cases this IE reference to.
 boolean IsEqual(IE otherIE)
          Checks whether this and the given IEs are equal.
 void RemoveCaseReference(Case travelCase)
          Removes the given case form from the references list of this IE.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caseReferences

private java.util.ArrayList caseReferences
The list of all cases this IE reference to.


name

public java.lang.String name
The name of the value held in this IE instance.


value

public java.lang.String value
The value of this IE.

Constructor Detail

IE

public IE(java.lang.String name,
          java.lang.String value)
Constructor.

Parameters:
name - The name of the value held in this IE instance.
value - The value of this IE.

IE

public IE(IE other)
Copy constructor.

Parameters:
other - The other IE to be copied.
Method Detail

equals

public boolean equals(java.lang.Object object)
See Also:
Object.equals(java.lang.Object)

IsEqual

public boolean IsEqual(IE otherIE)
Checks whether this and the given IEs are equal.

Parameters:
otherIE -
Returns:
A boolean value indicating whether this and the given IEs are equal.

GetCaseReferencesInterator

public java.util.Iterator GetCaseReferencesInterator()
Gets the interator for the cases this IE reference to.

Returns:
The requested iterator.

AddCaseReference

public void AddCaseReference(Case travelCase)
Adds a case reference to this IE.

Parameters:
travelCase - The case to add reference to.

GetCaseReferencesCount

public int GetCaseReferencesCount()
Gets the count of the case references of this IE.

Returns:
The count of the case references of this IE.

RemoveCaseReference

public void RemoveCaseReference(Case travelCase)
                         throws java.lang.IllegalArgumentException
Removes the given case form from the references list of this IE.

Parameters:
travelCase - The case to remove reference to.
Throws:
java.lang.IllegalArgumentException - Thrown if the given case is not on the refernces list of this IE.

ContainsCase

public boolean ContainsCase(Case travelCase)
Check if there is a given case on the list of references of this IE.

Parameters:
travelCase -
Returns:
Returns a boolean value indicating whether there is a given case on the list of references of this IE.