public class Set extends LinkedList
head, tail
Constructor and Description |
---|
Set()
Empty constructor.
|
Set(Node node)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
append(int data)
Adds an element to the
Set . |
void |
append(Node node)
Adds a
Node to the Set . |
java.lang.String |
toString()
Creates a
String representation of the Set . |
public Set()
Set
.public Set(Node node)
Set
with the given Node
as the head.node
- the first element in the Set
public void append(Node node)
Node
to the Set
.append
in class LinkedList
node
- the node to addpublic void append(int data)
Set
.append
in class LinkedList
data
- the element to addpublic java.lang.String toString()
String
representation of the Set
.toString
in class LinkedList
Set
as a String