jscheme
Interface SchemePair

All Known Implementing Classes:
Pair

public interface SchemePair

A SchemePair has two fields, first and rest (sometimes called car and cdr). SchemePairs are constructed using the factory method REPL.makeSchemePair(first,rest). There is a distinguished SchemePair REPL.EMPTY_PAIR, whose first and rest are itself. It represents the empty list.

Author:
Tim Hickey, Copyright 2001, license subsequently modified by Jscheme project members licensed under zlib licence (see license.txt)

Method Summary
 boolean equals(java.lang.Object that)
           
 java.lang.Object first()
           
 java.lang.Object getEltNover2(int n)
           
 java.lang.Object getFirst()
           
 java.lang.Object getRest()
           
 int hashCode()
           
 boolean isEmpty()
           
 int length()
           
 java.lang.Object listTail(int n)
           
 java.lang.Object nth(int n)
           
 java.lang.Object rest()
           
 java.lang.Object reverse()
           
 java.lang.Object second()
           
 java.lang.Object setEltNover2(int n, java.lang.Object v)
           
 java.lang.Object setFirst(java.lang.Object x)
           
 java.lang.Object setRest(java.lang.Object x)
           
 java.lang.StringBuffer stringifyPair(boolean quoted, java.lang.StringBuffer buf)
           
 java.lang.Object third()
           
 java.lang.String toString()
           
 

Method Detail

getFirst

public java.lang.Object getFirst()

getRest

public java.lang.Object getRest()

setFirst

public java.lang.Object setFirst(java.lang.Object x)

setRest

public java.lang.Object setRest(java.lang.Object x)

first

public java.lang.Object first()

rest

public java.lang.Object rest()

second

public java.lang.Object second()

third

public java.lang.Object third()

reverse

public java.lang.Object reverse()

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object that)

toString

public java.lang.String toString()

stringifyPair

public java.lang.StringBuffer stringifyPair(boolean quoted,
                                            java.lang.StringBuffer buf)

length

public int length()

nth

public java.lang.Object nth(int n)

listTail

public java.lang.Object listTail(int n)

isEmpty

public boolean isEmpty()

getEltNover2

public java.lang.Object getEltNover2(int n)

setEltNover2

public java.lang.Object setEltNover2(int n,
                                     java.lang.Object v)