net.infonode.util
Class IntList
java.lang.Object
net.infonode.util.IntList
public class IntList
- extends java.lang.Object
A single linked list of positive int's.
- Version:
- $Revision: 1.3 $
- Author:
- $Author: jesper $
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
EMPTY_LIST
public static final IntList EMPTY_LIST
- The empty list.
value
private int value
next
private IntList next
IntList
public IntList(int value,
IntList next)
- Constructor.
- Parameters:
value
- the int valuenext
- the next list element
getValue
public int getValue()
- Returns:
getNext
public IntList getNext()
isEmpty
public boolean isEmpty()
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
equals
public boolean equals(IntList list)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
write
public void write(java.io.ObjectOutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
decode
public static IntList decode(java.io.ObjectInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object