public class Cell
extends java.lang.Object
Constructor and Description |
---|
Cell()
Constructor for objects of class Cell.
|
Cell(int value)
Constructor for objects of class Cell.
|
Modifier and Type | Method and Description |
---|---|
int |
getData()
Accesses the value of a cell
|
Cell |
getNext()
Accesses the cell that follows the current one
|
void |
setData(int newData)
Updates the value of a cell
|
void |
setNext(Cell newNext)
Sets the cell that follows the current one in the list
|
public Cell()
public Cell(int value)
v
- The data of the new cellpublic int getData()
public Cell getNext()
public void setData(int newData)
newData
- The new data of the cellpublic void setNext(Cell newNext)
newNext
- The next cell