| java.lang.Object org.mandarax.kernel.LObject test.org.mandarax.reference.Person
Method Summary | |
public boolean | equals(Object obj) Indicates whether the object equals the receiver. | public boolean | equalsNot(Object obj) Indicates whether the object does not equal the receiver. | public Person | father() Get the father of this person. | public static Person | get(String n) Get the person with the name. | static Term | getComplexTerm(String n, String functName) Build a complex term from a string. | static Term | getConstant(String n) Get a constant with the provided name. | public static Fact | getFact(String predicate, String name1, String name2) Get a fact. | public String | getName() Get the name. | static Method | getPredicate(String name) Get a type one method with one parameter. | static Method | getPredicate(String name, Class parType) Get a type one method with one parameter (of the type specified). | public static Query | getQuery(String predicate, String name1, String name2) Get a query. | public static Rule | getRule(String headPredicate, String headName1, String headName2, String bodyPredicate, String bodyName1, String bodyName2) Build a rule. | public static Rule | getRule(String headPredicate, String headName1, String headName2, String bodyPredicate1, String bodyName11, String bodyName12, String bodyPredicate2, String bodyName21, String bodyName22) Build a rule. | public static Rule | getRule(String headPredicate, String headName1, String headName2, String bodyPredicate1, String bodyName11, String bodyName12, String bodyPredicate2, String bodyName21, String bodyName22, String bodyPredicate3, String bodyName31, String bodyName32) Build a rule. | public static Term | getTerm(String n) Get the term with the name.
We build a variable if the string is one of the registered variable names.
We build a function if the string is one of the registered function names followed by
a string in brackets. | public static Term | getVariable(String x) Get a variable with the provided name. | public int | hashCode() Get the hash code of the object. | public boolean | isBrotherOf(Person p) Method used to build a test predicate . | public boolean | isFatherOf(Person p) Method used to build a test predicate . | public boolean | isGrandFatherOf(Person p) Method used to build a test predicate . | public boolean | isOncleOf(Person p) Method used to build a test predicate . | public boolean | isRelativeOf(Person p) Method used to build a test predicate . | public boolean | isSonOf(Person p) Method used to build a test predicate . | public Person | son() Get the son of this person. | public String | toString() Convert the receiver to a string. |
Person | public Person()(Code) | | Constructor.
|
Person | public Person(String n)(Code) | | Constructor.
Parameters: n - the name of the person |
equals | public boolean equals(Object obj)(Code) | | Indicates whether the object equals the receiver.
Parameters: obj - the object to compare this object with true if the objects are equal, false otherwise |
equalsNot | public boolean equalsNot(Object obj)(Code) | | Indicates whether the object does not equal the receiver.
Parameters: obj - the object to compare this object with false if the objects are equal, true otherwise |
father | public Person father()(Code) | | Get the father of this person.
the instance representing the father of this object |
get | public static Person get(String n)(Code) | | Get the person with the name.
an instance Parameters: n - a name |
getComplexTerm | static Term getComplexTerm(String n, String functName)(Code) | | Build a complex term from a string.
a complex term Parameters: n - the string representing the term Parameters: functName - the name of the function |
getConstant | static Term getConstant(String n)(Code) | | Get a constant with the provided name.
a constant term Parameters: n - the name of the person that will be wrapped by the term |
getFact | public static Fact getFact(String predicate, String name1, String name2)(Code) | | Get a fact.
a fact Parameters: predicate - the string representation of the predicate Parameters: name1 - the string representation of the first term Parameters: name2 - the string representation of the second term |
getName | public String getName()(Code) | | Get the name.
the name of the person |
getPredicate | static Method getPredicate(String name)(Code) | | Get a type one method with one parameter.
a java method Parameters: name - the string representation of the predicate |
getPredicate | static Method getPredicate(String name, Class parType)(Code) | | Get a type one method with one parameter (of the type specified).
a method Parameters: name - the string representation of the predicate Parameters: parType - the type of the parameter |
getQuery | public static Query getQuery(String predicate, String name1, String name2)(Code) | | Get a query.
a query Parameters: predicate - the string representation of the predicate Parameters: name1 - the string representation of the first term Parameters: name2 - the string representation of the second term |
getRule | public static Rule getRule(String headPredicate, String headName1, String headName2, String bodyPredicate, String bodyName1, String bodyName2)(Code) | | Build a rule.
a rule Parameters: headPredicate - the string representation of the head predicate Parameters: headName1 - the string representation of a term Parameters: headName2 - the string representation of a term Parameters: bodyPredicate - the string representation of the predicate of the first (and only) fact in the body Parameters: bodyName1 - the string representation of a term Parameters: bodyName2 - the string representation of a term |
getRule | public static Rule getRule(String headPredicate, String headName1, String headName2, String bodyPredicate1, String bodyName11, String bodyName12, String bodyPredicate2, String bodyName21, String bodyName22)(Code) | | Build a rule.
a rule Parameters: headPredicate - the string representation of the head predicate Parameters: headName1 - the string representation of a term Parameters: headName2 - the string representation of a term Parameters: bodyPredicate1 - the string representation of the predicate of the first fact in the body Parameters: bodyName11 - the string representation of a term Parameters: bodyName12 - the string representation of a term Parameters: bodyPredicate2 - the string representation of the predicate of the second fact in the body Parameters: bodyName21 - the string representation of a term Parameters: bodyName22 - the string representation of a term |
getRule | public static Rule getRule(String headPredicate, String headName1, String headName2, String bodyPredicate1, String bodyName11, String bodyName12, String bodyPredicate2, String bodyName21, String bodyName22, String bodyPredicate3, String bodyName31, String bodyName32)(Code) | | Build a rule.
a rule Parameters: headPredicate - the string representation of the head predicate Parameters: headName1 - the string representation of a term Parameters: headName2 - the string representation of a term Parameters: bodyPredicate1 - the string representation of the predicate of the first fact in the body Parameters: bodyName11 - the string representation of a term Parameters: bodyName12 - the string representation of a term Parameters: bodyPredicate2 - the string representation of the predicate of the second fact in the body Parameters: bodyName21 - the string representation of a term Parameters: bodyName22 - the string representation of a term Parameters: bodyPredicate3 - the string representation of the predicate of the third fact in the body Parameters: bodyName31 - the string representation of a term Parameters: bodyName32 - the string representation of a term |
getTerm | public static Term getTerm(String n)(Code) | | Get the term with the name.
We build a variable if the string is one of the registered variable names.
We build a function if the string is one of the registered function names followed by
a string in brackets. Otherwise we build a constant.
a term Parameters: n - the string representation of a term |
getVariable | public static Term getVariable(String x)(Code) | | Get a variable with the provided name.
a variable term Parameters: x - the variable name |
hashCode | public int hashCode()(Code) | | Get the hash code of the object.
the hash value |
son | public Person son()(Code) | | Get the son of this person.
the instance representing the son of this object |
toString | public String toString()(Code) | | Convert the receiver to a string.
the string representation of this object |
|
|