public abstract class Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private NodeId |
id |
(package private) static boolean |
ignoreSourceInComparisons
When set to true, the source object is ignored in
equals(java.lang.Object) and hashCode() . |
private java.lang.Object |
source |
Modifier | Constructor and Description |
---|---|
protected |
Node(NodeId id,
java.lang.Object source) |
Modifier and Type | Method and Description |
---|---|
abstract Node |
copy(NodeId id)
Returns a copy of the node with a new ID.
|
boolean |
equals(java.lang.Object obj) |
NodeId |
getId() |
java.lang.Object |
getSource() |
int |
hashCode() |
static boolean ignoreSourceInComparisons
equals(java.lang.Object)
and hashCode()
.
Only used in tests.private final NodeId id
private final java.lang.Object source
protected Node(NodeId id, java.lang.Object source)
public NodeId getId()
public java.lang.Object getSource()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object