net.fortytwo.ripple
Class ListNode<T>
java.lang.Object
net.fortytwo.ripple.ListNode<T>
public abstract class ListNode<T>
- extends Object
The head of an abstract linked list.
- Author:
- Joshua Shinavier (http://fortytwo.net)
ListNode
public ListNode()
getFirst
public abstract T getFirst()
- Returns:
- the value at the head of the list, or
null if this is a nil list
getRest
public abstract ListNode<T> getRest()
- Returns:
- the rest of the list, or
null if this is a nil list
isNil
public abstract boolean isNil()
- Returns:
- whether this is a nil list node, being the terminator of any number of lists
equals
public boolean equals(ListNode<T> other)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2007-2014. All Rights Reserved.