public abstract class GraphNodeObject extends Object implements Comparable
Modifier and Type | Class and Description |
---|---|
protected class |
GraphNodeObject.ParameterPairs
Class defining a set of parameter/value pairs that define the literal
|
Modifier and Type | Field and Description |
---|---|
protected String |
name
Name assigned to this action of literal
|
protected GraphNodeObject.ParameterPairs |
parameters
A list of parameter/value pairs defining what this literal applies to
|
Constructor and Description |
---|
GraphNodeObject(String name)
Creates a new instance of GraphNodeObject
|
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String[] p)
Adds a parameter/value pair to the object
|
void |
addParameter(String[] p,
int index)
Adds a parameter/value pair to the object at a specific place in the list
|
void |
addParameter(String param,
String value)
Adds a parameter/value pair to the object
|
void |
addParameter(String param,
String value,
int index)
Adds a parameter/value pair to the object at a specific place in the list
|
int |
compareTo(Object o)
Implementation of Comparable interface
|
void |
copyParameters(GraphNodeObject object2)
Copies the parameters from the current object to another
|
String |
getName()
Returns a reference to the name of the object
|
String[] |
getParameter(int index)
Returns a requested parameter pair
|
abstract boolean |
match(GraphNodeObject l2)
Compares the GraphNodeObject against another to test for equivalence
|
boolean |
matchParams(GraphNodeObject l2)
Compares this object's parameters against another and returns true if they are equivalent
|
int |
numParameters()
Returns the number of parameters in the set
|
void |
removeParameter(int index)
Removes a parameter/value pair from the object
|
String |
toString()
Converts the GraphNodeObject to a String
|
protected String name
protected GraphNodeObject.ParameterPairs parameters
public GraphNodeObject(String name)
name
- public abstract boolean match(GraphNodeObject l2)
l2
- public String getName()
public void addParameter(String[] p)
p
- public void addParameter(String param, String value)
param
- value
- public void addParameter(String[] p, int index)
p
- index
- public void addParameter(String param, String value, int index)
param
- value
- index
- public void removeParameter(int index)
index
- public void copyParameters(GraphNodeObject object2)
object2
- public int numParameters()
public String[] getParameter(int index)
index
- public boolean matchParams(GraphNodeObject l2)
l2
- public int compareTo(Object o) throws ClassCastException
compareTo
in interface Comparable
ClassCastException