ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnMigrationType

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
        |
        +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnMigrationType
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, java.io.Serializable

public class CoopnMigrationType
extends CoopnElement

Coopn migration type.

See Also:
CoopnElement, Serialized Form

Field Summary
static int BORROW
           
static int GIVE
           
static int LEND
           
static int NORMAL
           
static int TAKE
           
 
Constructor Summary
CoopnMigrationType(CoopnType type, int migration)
          Simple constructor.
 
Method Summary
 java.lang.Object clone()
          Cloning method.
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
          Equality method.
 int hashCode()
          Hashcode method.
 CoopnElement interpret(CoopnSubstitution sigma)
          Interpretation of this element according to a substitution.
 boolean isBorrow()
          Is a borrow migration ?. return true iff this represents a borrow migration.
 boolean isGive()
          Is a give migration ?. return true iff this represents a give migration.
 boolean isLend()
          Is a lend migration ?. return true iff this represents a lend migration.
 boolean isNormal()
          Is no migration ?. return true iff this represents no migration.
 boolean isTake()
          Is a take migration ?. return true iff this represents a take migration.
 int migrationInfo()
          Get the migration information.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
          CoCo conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
          Complete textual elements conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextTerm toCompleteTextTerm(CoopnSymbolTable table)
          Get the complete textual term representing the type portion only, without caring about the migration information.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
          Textual elements conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextTerm toTextTerm()
          Get the textual term representing the type portion only, without caring about the migration information.
 CoopnType type()
          Get the Type ?. return true the type.
 java.lang.Object unmodifiableCopy()
          Copy the element into an unmodifiable structure.
static boolean validMigrationInfo(int migrationInfo)
           
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
cloneCoopnElement, pureCOIL, pureCOOPN, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteText, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toString, toString, toString, toTokens, toTokens, toTokens
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL

GIVE

public static final int GIVE

TAKE

public static final int TAKE

LEND

public static final int LEND

BORROW

public static final int BORROW
Constructor Detail

CoopnMigrationType

public CoopnMigrationType(CoopnType type,
                          int migration)
                   throws java.lang.IllegalArgumentException,
                          CoopnTypingProblemException
Simple constructor.
Method Detail

validMigrationInfo

public static boolean validMigrationInfo(int migrationInfo)

compareTo

public int compareTo(java.lang.Object o)

interpret

public CoopnElement interpret(CoopnSubstitution sigma)
Description copied from class: CoopnElement
Interpretation of this element according to a substitution.
Overrides:
interpret in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
sigma - the substitution; cannot be null
Returns:
a new CoopnElement object, coreesponding to the interpretation.

type

public CoopnType type()
Get the Type ?. return true the type.

isNormal

public boolean isNormal()
Is no migration ?. return true iff this represents no migration.

isGive

public boolean isGive()
Is a give migration ?. return true iff this represents a give migration.

isTake

public boolean isTake()
Is a take migration ?. return true iff this represents a take migration.

isLend

public boolean isLend()
Is a lend migration ?. return true iff this represents a lend migration.

isBorrow

public boolean isBorrow()
Is a borrow migration ?. return true iff this represents a borrow migration.

migrationInfo

public int migrationInfo()
Get the migration information.
Returns:
the migration information

equals

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

hashCode

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

toTextTerm

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextTerm toTextTerm()
Get the textual term representing the type portion only, without caring about the migration information. Actually, a type may be represented by a unique term.
Returns:
The textual term representing the type.

toText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
Description copied from class: CoopnElement
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 CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
a CoopnTextElement image.

toCompleteTextTerm

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextTerm toCompleteTextTerm(CoopnSymbolTable table)
Get the complete textual term representing the type portion only, without caring about the migration information. Actually, a type may be represented by a unique term.
Returns:
The textual term representing the type.

toCompleteText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
Description copied from class: CoopnElement
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 CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
table - the symbol table used to generate symbol references
Returns:
a CoopnTextElement image.

toCoco

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
                                                                       throws java.lang.IllegalArgumentException
Description copied from class: CoopnElement
CoCo conversion method. Must be defined in the inherited classes. This routine convert an element into a string representing it in a CO-opn COnpact form.
Overrides:
toCoco in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
origin - the module which generated the Coco conversion
table - the symbol table used to generate symbol references
Returns:
a String image of the element.
Throws:
java.lang.IllegalArgumentException - A used symbol is not in the symbol table.

unmodifiableCopy

public java.lang.Object unmodifiableCopy()
Description copied from class: CoopnElement
Copy the element into an unmodifiable structure.
Overrides:
unmodifiableCopy in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
an unmodififable clone of the element.

clone

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