|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectlinkedLists.DIntList
public class DIntList
Constructor Summary | |
---|---|
DIntList()
Default constructor that creates an empty list |
|
DIntList(DIntNode n)
constructor to create a list with head node n |
Method Summary | |
---|---|
void |
addFirst(DIntNode n)
add a new node at front of list |
void |
addValue(int i)
add node to front of list containing a given value |
DIntNode |
delete(int v)
delete all nodes containing the value v from list and return the head of the list |
DIntNode |
delete0()
delete the first node containing 0 from list and return the head of the list |
DIntNode |
getHead()
return the head of the list |
boolean |
isEmpty()
is the list empty? |
void |
setHead(DIntNode n)
set the head of the list |
int |
size()
return size of list |
int |
sum()
returns the sum of the elements list, recursive |
java.lang.String |
toString()
String representation of list, recursive |
void |
writePos()
output positive elements of list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DIntList()
public DIntList(DIntNode n)
Method Detail |
---|
public DIntNode getHead()
public void setHead(DIntNode n)
public boolean isEmpty()
public void addFirst(DIntNode n)
public void addValue(int i)
public void writePos()
public DIntNode delete0()
public DIntNode delete(int v)
public int size()
public int sum()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |