Package FAtiMA.Core.wellFormedNames
Class Substitution
- java.lang.Object
-
- FAtiMA.Core.wellFormedNames.Substitution
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
Inequality
public class Substitution extends java.lang.Object implements java.io.Serializable, java.lang.CloneableRepresents a substitution of a variable for another variable or constant symbol- Author:
- Joao Dias
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Substitution(Symbol var, Symbol value)Creates a new Substitution of the type variable/value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object obj)Compares a substitution with a given objectSymbolgetValue()Gets the substitution's value - Right sideSymbolgetVariable()Gets the substitution's variable - Left sidejava.lang.StringtoString()Converts the substitution to a String
-
-
-
Method Detail
-
getValue
public Symbol getValue()
Gets the substitution's value - Right side- Returns:
- the right side of the substitution
-
getVariable
public Symbol getVariable()
Gets the substitution's variable - Left side- Returns:
- the left side of the substitution
-
toString
public java.lang.String toString()
Converts the substitution to a String- Overrides:
toStringin classjava.lang.Object- Returns:
- the converted String
-
equals
public boolean equals(java.lang.Object obj)
Compares a substitution with a given object- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- - the object to compare- Returns:
- If the object corresponds to an equal substitution returns true, false otherwise
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-