patron
Class Empty

java.lang.Object
  extended by patron.List
      extended by patron.Empty

public class Empty
extends List

liste vide.

Author:
jroyer

Constructor Summary
Empty()
          constructeur des listes vides.
 
Method Summary
 List append(List l)
          concatenation.
 boolean isEmpty()
          teste de la liste vide.
 int length()
          longueur.
 NotEmpty putLast(int e)
          ajout a la fin.
 List reverse()
          inversion.
 java.lang.String toString()
          redefinition de toString.
 
Methods inherited from class patron.List
cons
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Empty

public Empty()
constructeur des listes vides.

Method Detail

isEmpty

public final boolean isEmpty()
teste de la liste vide.

Specified by:
isEmpty in class List
Returns:
booleen

length

public final int length()
longueur.

Specified by:
length in class List
Returns:
entier

putLast

public final NotEmpty putLast(int e)
ajout a la fin.

Specified by:
putLast in class List
Parameters:
e - l'entier a ajouter
Returns:
une liste non vide

reverse

public final List reverse()
inversion.

Specified by:
reverse in class List
Returns:
une liste

append

public final List append(List l)
concatenation.

Specified by:
append in class List
Parameters:
l - liste a concatener
Returns:
une vouvelle liste

toString

public final java.lang.String toString()
redefinition de toString.

Specified by:
toString in class List
Returns:
une chaine