|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cs.ai.kreator.logic.Term
edu.cs.ai.kreator.logic.Constant
public class Constant
This class models a constant, i.e., a member of the universe under discourse.
| Field Summary | |
|---|---|
static org.apache.log4j.Logger |
LOG
|
| Method Summary | |
|---|---|
int |
compareTo(Term other)
|
static Constant |
create(LanguageFactory languageFactory,
java.lang.String name)
Constructs a constant with the given name and default sort. |
static Constant |
create(LanguageFactory lang,
java.lang.String name,
Sort sort)
Constructs a new constant with the given name and sort. |
static Constant |
createOrGet(LanguageFactory lang,
java.lang.String name)
If not already existing, constructs a constant with the given name and the default sort. |
static Constant |
createOrGet(LanguageFactory lang,
java.lang.String name,
Sort sort)
Returns an already existing constant or, if necessary, constructs a new constant with the given name and sort. |
boolean |
equals(java.lang.Object obj)
If the other object is a Term, then equals returns true if both objects have the same class, same name and sort. |
LanguageFactory |
getLanguageFactory()
Returns the LanguageFactory this constant object belongs to. |
java.lang.String |
getName()
returns the name (identifier) of this Term |
Sort |
getSort()
Returns the sort of this term. |
int |
hashCode()
|
boolean |
isGround()
Specifies if this term is ground, i.e., if there occurs any variable in this term |
java.lang.String |
toLatex()
Returns a Latex grammar conform string to generate variables, rules (conditionals) etc. |
java.lang.String |
toString()
|
| Methods inherited from class edu.cs.ai.kreator.logic.Term |
|---|
getAllSequences |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger LOG
| Method Detail |
|---|
public static Constant create(LanguageFactory lang,
java.lang.String name,
Sort sort)
throws WriteProtectionException
name - a string.sort - a sortlanguageFactory - the LanguageFactory the constant will be registered to
java.lang.IllegalArgumentException - if a constant with the same name already exists
WriteProtectionException
public static Constant create(LanguageFactory languageFactory,
java.lang.String name)
throws WriteProtectionException
name - a string.languageFactory - the LanguageFactory the constant will be registered to
java.lang.IllegalArgumentException - if a constant with the same name already exists
WriteProtectionException
public static Constant createOrGet(LanguageFactory lang,
java.lang.String name,
Sort sort)
throws WriteProtectionException
name - a string.sort - a sortlanguageFactory - the LanguageFactory the constant will be or is already registered to
WriteProtectionException
public static Constant createOrGet(LanguageFactory lang,
java.lang.String name)
throws WriteProtectionException
name - a string.sort - a sortlanguageFactory - the LanguageFactory the constant will be or is already registered to
WriteProtectionExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toLatex()
Latexable
toLatex in interface Latexablepublic boolean isGround()
Term
isGround in class Termpublic java.lang.String getName()
Term
getName in class Termpublic Sort getSort()
Term
getSort in class Termpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Term
equals in class Termpublic int compareTo(Term other)
compareTo in interface java.lang.Comparable<Term>public LanguageFactory getLanguageFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||