public abstract class AbstractNode extends Object implements Node, Mergeable<AbstractNode>
| Modifier and Type | Field and Description |
|---|---|
protected UUID |
id
The identifier of the node
|
protected String |
name
The shorthand name associated to the node
|
| Constructor and Description |
|---|
AbstractNode(@NonNull String name)
Constructor with node name
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
UUID |
getId()
Retrieves the identifier of the node
|
String |
getName()
Retrieves the name of the node
|
int |
hashCode() |
boolean |
isFinal()
Retrieves the final state condition
flag.
|
AbstractNode |
merge(AbstractNode node)
Merges the information of the given node
into the current instance.
|
void |
setFinal(boolean finalState)
Sets whether the state is
final or not.
|
protected String name
protected final UUID id
public AbstractNode(@NonNull
@NonNull String name)
name - the name of the nodepublic UUID getId()
public void setFinal(boolean finalState)
finalState - the final state flagpublic boolean isFinal()
public String getName()
public AbstractNode merge(AbstractNode node)
merge in interface Mergeable<AbstractNode>node - the node to mergeCopyright © 2019 state-machine. All rights reserved.