public interface Link
Defines a network Link. These are used to connect network. In this API however this is not done directly in the link instances. The network instances handle the relationship between nodes and links. This is the equivalent to a Graph Edge or Arc if you prefer.
Like the nodes
, link objects should be created by their
corresponding network
instances and provide facilities to set
and get various property values. For convenience, it also provides a set and
a get for a double
value, normally associated with some kind
of distance between the nodes.
Node
,
Network
,
Network.createLink()
Modifier and Type | Method and Description |
---|---|
int |
getID()
Returns the Integer ID of this Link.
|
java.lang.String |
getProperty(java.lang.String key)
Returns the value of the property with the name given by the given key,
or null if no property with this name exists.
|
double |
getValue()
Returns a double value associated with the link.
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Adds or sets a property to this link.
|
void |
setValue(double value)
Sets the value for this links "distance" value.
|
int getID()
double getValue()
void setValue(double value)
getValue()
.value
- a value to be set for this link.void setProperty(java.lang.String key, java.lang.String value)
key
- a String representation of the name of the propertyvalue
- a String representation of the property valuejava.lang.String getProperty(java.lang.String key)
key
- a property name