|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdrvgraph.j2d.SlotPattern
public class SlotPattern
Represents the slot pattern. Slot patterns represent conditions on slots
(or class properties).
Slot patterns consist of a slot name, a variable and a list of
value constraints. The variable in the slot pattern is used, in order
for the slot value to be unified, with the latter having to satisfy the list of
constraints. The argument list of each slot pattern is divided in two parts,
separated by ; on the left all the variables are placed and on the right all
the corresponding expressions and conditions, regarding the variables on the
left. For instance, in the slot pattern age(X|X>18),
age is the slot name, X is the variable and
X>18 is the constraint.
| Constructor Summary | |
|---|---|
SlotPattern()
Creates a slot pattern with no name, no variable and and an empty list of constraints. |
|
SlotPattern(java.lang.String sn,
java.lang.String var,
java.lang.String exp)
Creates a slot pattern with a defined name, a defined variable and a given list of constraints. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object anotherSp)
Compares this slot pattern with a given slot pattern. |
java.lang.String |
getExpression()
Returns a string that represents the expression, i.e. the list of constraints. |
java.lang.String |
getName()
Returns a string that represents the slot name. |
java.lang.String |
getVar()
Returns a string that represents the variable. |
void |
setExpression(java.lang.String exp)
Sets the expression. |
void |
setName(java.lang.String name)
Sets the slot name. |
void |
setVar(java.lang.String var)
Sets the variable. |
java.lang.String |
toString()
Returns a string representation of this slot pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SlotPattern()
public SlotPattern(java.lang.String sn,
java.lang.String var,
java.lang.String exp)
sn - the slot name stringvar - the variable nameexp - the list of constraints| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - the string used as the slot namepublic java.lang.String getVar()
public void setVar(java.lang.String var)
var - the string used as the variable namepublic java.lang.String getExpression()
public void setExpression(java.lang.String exp)
exp - the string representing the expression
public int compareTo(java.lang.Object anotherSp)
throws java.lang.ClassCastException
compareTo in interface java.lang.ComparableanotherSp - the slot pattern to compare this slot pattern to
java.lang.ClassCastException - A ClassCastException is thrown if the
Object to compare this object to belongs to a different class.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||