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 Setpublic void append(Node node)
Node to the Set.append in class LinkedListnode - the node to addpublic void append(int data)
Set.append in class LinkedListdata - the element to addpublic java.lang.String toString()
String representation of the Set.toString in class LinkedListSet as a String