All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kl1.lang.Cons

java.lang.Object
   |
   +----kl1.lang.KL1Object
           |
           +----kl1.lang.Cons

public class Cons
extends KL1Object
This class represents a cons cell.

Author:
Satoshi KURAMOCHI

Variable Index

 o car
The first element of the cons cell
 o cdr
The second element of the cons cell

Constructor Index

 o Cons(KL1Object, KL1Object)
Constructs a cons cell.

Method Index

 o deref()
Dereferences the object.
 o gunify(KL1Object)
Checks whether this object and that are unifiable.
 o print()
Prints the information of the object.
 o shallow_unify(KL1Machine, KL1Object)
Unifies this object and that without recursive unification.
 o toString()
 o unify(KL1Machine, KL1Object)
Unifies this object and that.

Variables

 o cdr
 public KL1Object cdr
The second element of the cons cell

 o car
 public KL1Object car
The first element of the cons cell

Constructors

 o Cons
 public Cons(KL1Object cdr,
             KL1Object car)
Constructs a cons cell.

Parameters:
cdr - the second element of the cons cell.
car - the first element of the cons cell.

Methods

 o deref
 public KL1Object deref()
Dereferences the object.

Overrides:
deref in class KL1Object
 o gunify
 public KL1Object gunify(KL1Object that)
Checks whether this object and that are unifiable.

Overrides:
gunify in class KL1Object
 o unify
 public void unify(KL1Machine mach,
                   KL1Object that)
Unifies this object and that.

Overrides:
unify in class KL1Object
 o shallow_unify
 public void shallow_unify(KL1Machine mach,
                           KL1Object that)
Unifies this object and that without recursive unification.

Overrides:
shallow_unify in class KL1Object
 o toString
 public String toString()
Overrides:
toString in class KL1Object
 o print
 public String print()
Prints the information of the object.

Overrides:
print in class KL1Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index