|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectescjava.prover.SExp
escjava.prover.SList
escjava.prover.SPair
A SPair
is a pair of a SExp
and a
SList
; together with the SNil
class, it is
used to implement lists of SExp
s.
Considered as SList
s, SPair
s always
represent non-empty lists.
Field Summary | |
SExp |
head
The head of our list; this field should not be modified by clients and should be non-null. |
SList |
tail
The tail of our list; this field should not be modified by clients and should be non-null. |
Constructor Summary | |
SPair(SExp head,
SList tail)
Return a new list with given head and tail. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Return true if the heads are equal and the tails are equal. |
(package private) SPair |
getPair()
If we represent a non-empty list, return it as a SPair ; otherwise, throw SExpTypeError . |
boolean |
isEmpty()
Are we an empty list? |
int |
length()
Return our length |
Methods inherited from class escjava.prover.SList |
addEnd, addFront, append, at, fromArray, getList, isList, main, make, make, make, make, make, make, make, make, make, prettyPrint, print, reverseD, setAt |
Methods inherited from class escjava.prover.SExp |
display, fancyMake, getAtom, getInteger, isAtom, isInteger, make, print, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public SExp head
public SList tail
Constructor Detail |
public SPair(SExp head, SList tail)
Both must be non-null.
Method Detail |
public boolean isEmpty()
isEmpty
in class SList
SPair getPair()
SPair
; otherwise, throw SExpTypeError
.
getPair
in class SList
public int length()
length
in class SList
public boolean equals(java.lang.Object o)
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |