Class AbstractTerm
java.lang.Object
fr.lirmm.graphik.integraal.api.core.AbstractTerm
- All Implemented Interfaces:
Term, Serializable, Comparable<Term>
-
Nested Class Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an abstract term base implementation. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanCompares this term with another one using type and identifier equality.booleangetLabel()Return a label that represents this term.inthashCode()final booleanReturns true iff this term is a Constant.final booleanReturns true if this term is a literal, in this caseTerm.isConstant()must also return true.final booleanReturns true if this term is a Variable.toString()Methods inherited from interface Term
getIdentifier, getType
-
Constructor Details
-
AbstractTerm
protected AbstractTerm()Creates an abstract term base implementation.
-
-
Method Details
-
getLabel
Description copied from interface:TermReturn a label that represents this term. There is no guarantee that two terms with the same label represent the same term (seeTerm.getIdentifier()). -
isConstant
public final boolean isConstant()Description copied from interface:TermReturns true iff this term is a Constant. The returned value ofTerm.isConstant()must be equals to !Term.isVariable().- Specified by:
isConstantin interfaceTerm- Returns:
- true if this term is a constant, false otherwise.
-
isVariable
public final boolean isVariable()Description copied from interface:TermReturns true if this term is a Variable. The returned value ofTerm.isVariable()must be equals to !Term.isConstant().- Specified by:
isVariablein interfaceTerm- Returns:
- true if this term is a variable, false otherwise.
-
isLiteral
public final boolean isLiteral()Description copied from interface:TermReturns true if this term is a literal, in this caseTerm.isConstant()must also return true. -
compareTo
- Specified by:
compareToin interfaceComparable<Term>
-
equals
-
equals
Compares this term with another one using type and identifier equality.- Parameters:
term- the term to compare with- Returns:
- true if both terms have the same type and identifier
-
hashCode
-
toString
-