|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.util.graph.impl.Node
public class Node
Node.java
Field Summary | |
---|---|
protected static java.lang.String |
colon
|
private java.lang.Object |
data
|
private long |
id
|
private static long |
idCounter
|
protected static java.lang.String |
pref
|
private static long |
serialVersionUID
|
private int |
tag
|
Constructor Summary | |
---|---|
|
Node(java.lang.Object data)
Creates a new instance of Node |
private |
Node(java.lang.Object data,
int id,
int tag)
Used for copy operation |
Method Summary | |
---|---|
void |
clear()
|
Node |
copy()
|
boolean |
equals(java.lang.Object obj)
Returns true if this node has the same ID as another node. This method is used for inserting and retrieving Node objects in a collection. |
boolean |
equalsData(Node on)
Returns true if this node has the same data as another node. |
protected void |
finalize()
|
java.lang.Object |
getData()
|
long |
getID()
|
int |
getTag()
|
int |
hashCode()
|
private void |
readObject(java.io.ObjectInputStream in)
|
void |
setData(java.lang.Object data)
|
int |
setTag(int tag)
|
java.lang.String |
toString()
|
private void |
writeObject(java.io.ObjectOutputStream out)
customise serialisable so that we can also serialise the static id counter |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private long id
private static volatile long idCounter
private java.lang.Object data
protected static final java.lang.String pref
protected static final java.lang.String colon
private int tag
Constructor Detail |
---|
public Node(java.lang.Object data)
private Node(java.lang.Object data, int id, int tag)
data
- id
- Method Detail |
---|
public int getTag()
public int setTag(int tag)
public java.lang.Object getData()
public void setData(java.lang.Object data)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void clear()
public long getID()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsData(Node on)
on
-
public Node copy()
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
out
-
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |