ConForM.CoopnTools.CoKer.CoalaMgr
Class CoalaIfInstruction

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
        |
        +--ConForM.CoopnTools.CoKer.CoalaMgr.CoalaInstruction
              |
              +--ConForM.CoopnTools.CoKer.CoalaMgr.CoalaIfInstruction
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, java.io.Serializable

public class CoalaIfInstruction
extends CoalaInstruction

Coala if instruction.

See Also:
CoalaElement, Serialized Form

Constructor Summary
CoalaIfInstruction(CoopnCondition condition, CoalaInstruction thenPart)
          Simple constructor.
CoalaIfInstruction(CoopnCondition condition, CoalaInstruction thenPart, CoalaInstruction elsePart)
          Simple constructor.
CoalaIfInstruction(CoopnCondition condition, CoalaInstruction thenPart, CoalaInstruction elsePart, CoopnTypeRelation rel)
          Simple constructor.
CoalaIfInstruction(CoopnCondition condition, CoalaInstruction thenPart, CoopnTypeRelation rel)
          Simple constructor.
 
Method Summary
 java.lang.Object clone()
          Cloning method.
 CoopnCondition condition()
          Get the condition associated to this if instruction.
 CoalaInstruction elsePart()
          Get the else-part associated to this if instruction.
 boolean equals(java.lang.Object obj)
          Equality method.
 boolean hasElsePart()
          Test if this if instruction has an else-part.
 int hashCode()
          Hashcode method.
 CoalaInstruction thenPart()
          Get the then-part associated to this if instruction.
 ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextElement toCompleteText(CoopnSymbolTable table)
          Complete textual elements conversion method.
 ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextElement toText()
          Textual elements conversion method.
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
cloneCoalaElement, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteText, toString, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoalaIfInstruction

public CoalaIfInstruction(CoopnCondition condition,
                          CoalaInstruction thenPart)
                   throws java.lang.IllegalArgumentException
Simple constructor.

CoalaIfInstruction

public CoalaIfInstruction(CoopnCondition condition,
                          CoalaInstruction thenPart,
                          CoopnTypeRelation rel)
                   throws java.lang.IllegalArgumentException
Simple constructor. The specified sub-sort/sub-type relation is used to check the term.
Parameters:
rel - the type realtion object, or null.

CoalaIfInstruction

public CoalaIfInstruction(CoopnCondition condition,
                          CoalaInstruction thenPart,
                          CoalaInstruction elsePart)
                   throws java.lang.IllegalArgumentException
Simple constructor.

CoalaIfInstruction

public CoalaIfInstruction(CoopnCondition condition,
                          CoalaInstruction thenPart,
                          CoalaInstruction elsePart,
                          CoopnTypeRelation rel)
                   throws java.lang.IllegalArgumentException
Simple constructor. The specified sub-sort/sub-type relation is used to check the term.
Parameters:
rel - the type realtion object, or null.
Method Detail

hasElsePart

public boolean hasElsePart()
Test if this if instruction has an else-part.
Returns:
true iff the if instruction has an else-part.

condition

public CoopnCondition condition()
Get the condition associated to this if instruction.
Returns:
the condition associated to this instruction.

thenPart

public CoalaInstruction thenPart()
Get the then-part associated to this if instruction.
Returns:
the instruction representing the then-part.

elsePart

public CoalaInstruction elsePart()
Get the else-part associated to this if instruction.
Returns:
the instruction representing the else-part.

equals

public boolean equals(java.lang.Object obj)
Description copied from class: CoalaElement
Equality method. Must be defined in the inherited classes.
Overrides:
equals in class CoalaElement
Following copied from class: ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
Parameters:
obj - the object to compare
Returns:
true iff this object and the parameter are equals.

hashCode

public int hashCode()
Description copied from class: CoalaElement
Hashcode method. Must be defined in the inherited classes.
Overrides:
hashCode in class CoalaElement
Following copied from class: ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
Returns:
the hash code.

toText

public ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextElement toText()
Description copied from class: CoalaElement
Textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a user-friendly textual element representing it. The string interpretation of this element is very intuitive by a user, but may be incorrect in the sense that it may be rejected by a checker.
Overrides:
toText in class CoalaElement
Following copied from class: ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
Returns:
a CoopnTextElement image.

toCompleteText

public ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextElement toCompleteText(CoopnSymbolTable table)
Description copied from class: CoalaElement
Complete textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a correct textual element representing it. The string interpretation of this element will be accepted by a checker, but may be difficult to read by users, due to the additionnal information, like parenthesis and so on.
Overrides:
toCompleteText in class CoalaElement
Following copied from class: ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
Parameters:
table - the symbol table used to generate symbol references
Returns:
a CoopnTextElement image.

clone

public java.lang.Object clone()
Description copied from class: CoalaElement
Cloning method. Must be defined in the inherited classes.
Overrides:
clone in class CoalaElement
Following copied from class: ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement
Returns:
a clone object.