Package net.infonode.util
Class IntList
- java.lang.Object
-
- net.infonode.util.IntList
-
public class IntList extends java.lang.ObjectA single linked list of positive int's.
-
-
Field Summary
Fields Modifier and Type Field Description static IntListEMPTY_LISTThe empty list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntListdecode(java.io.ObjectInputStream in)booleanequals(java.lang.Object object)booleanequals(IntList list)IntListgetNext()intgetValue()inthashCode()booleanisEmpty()java.lang.StringtoString()voidwrite(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:
equalsin classjava.lang.Object
-
equals
public boolean equals(IntList list)
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
toStringin classjava.lang.Object
-
-