Package 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.
-
-
Field Summary
Fields Modifier and Type Field Description static IntList
EMPTY_LIST
The empty list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntList
decode(java.io.ObjectInputStream in)
boolean
equals(java.lang.Object object)
boolean
equals(IntList list)
IntList
getNext()
int
getValue()
int
hashCode()
boolean
isEmpty()
java.lang.String
toString()
void
write(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
EMPTY_LIST
public static final IntList EMPTY_LIST
The empty list.
-
-
Constructor Detail
-
IntList
public IntList(int value, IntList next)
Constructor.- Parameters:
value
- the int valuenext
- the next list element
-
-
Method Detail
-
getValue
public int getValue()
- Returns:
-
getNext
public IntList getNext()
-
isEmpty
public boolean isEmpty()
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
equals
public boolean equals(IntList list)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.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 classjava.lang.Object
-
-