org.melati.poem.util
Class ConsEnumeration<T>

Package class diagram package ConsEnumeration
java.lang.Object
  extended by org.melati.poem.util.ConsEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, SkipEnumeration<T>

public class ConsEnumeration<T>
extends Object
implements SkipEnumeration<T>

An implementation of the Lisp cons function on enumerations ie it allows you to add an object to the front of an Enumeration.


Constructor Summary
ConsEnumeration(T head, Enumeration<T> tail)
          Constructor with head and tail.
 
Method Summary
 boolean hasMoreElements()
          
 T nextElement()
          
 void skip()
          Skip an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsEnumeration

public ConsEnumeration(T head,
                       Enumeration<T> tail)
Constructor with head and tail.

Parameters:
head -
tail -
Method Detail

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration<T>
See Also:
Enumeration.hasMoreElements()

nextElement

public T nextElement()

Specified by:
nextElement in interface Enumeration<T>
See Also:
Enumeration.nextElement()

skip

public void skip()
Skip an Element.

Specified by:
skip in interface SkipEnumeration<T>
See Also:
SkipEnumeration.skip()


Copyright © 2000-2010 PanEris. All Rights Reserved.