Class polya.polycell
All Packages Class Hierarchy This Package Previous Next Index
Class polya.polycell
java.lang.Object
|
+----polya.polycell
- public class polycell
- extends Object
NonEmptyList is the sub-class of List consisting of non-empty
lists. Every NonEmptyList has a first and a rest.
-
polycell(Object, Object)
- polycell is the constructor for the cell of a Polyist,
given a First and a Rest.
-
first()
- first() returns the first element of a NonEmptyList.
-
rest()
- rest() returns the rest of a NonEmptyList.
-
setFirst(Object)
- setFirst() sets the first element of a NonEmptyList.
polycell
public polycell(Object First,
Object Rest)
- polycell is the constructor for the cell of a Polyist,
given a First and a Rest.
Use static method cons of class Polylist to avoid using 'new'
explicitly.
first
public Object first()
- first() returns the first element of a NonEmptyList.
rest
public Polylist rest()
- rest() returns the rest of a NonEmptyList.
setFirst
public void setFirst(Object value)
- setFirst() sets the first element of a NonEmptyList.
All Packages Class Hierarchy This Package Previous Next Index