|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NetElement
The base interface of all NetElements in VinetS. Usually, a NetElement implementation class should not provide a public constructor. Instead, NetElements should be created by a factory.
Method Summary | |
---|---|
void |
clearLabels()
Clears all labels of this NetElement. |
boolean |
containsLabel(java.lang.Object key)
Returns true if the label contains a mapping for the specified key. |
boolean |
getBooleanLabel(java.lang.Object key)
Returns the label value associated with the passed key as boolean value. |
java.lang.Object |
getData()
Delivers application specific data stored by this NetElement which have no relation to the network algorithms. |
double |
getDoubleLabel(java.lang.Object key)
Returns the label value associated with the passed key as double value. |
NetElementGeometry |
getGeometry()
Delivers the NetElementGeometry instance containing the position and the size of this NetElement in the relative coordinate system of its host. |
NetElement |
getHost()
Delivers the parent of this NetElement in the inclusion hierarchy. |
java.lang.Object |
getID()
Delivers the identifier of this NetElement. |
int |
getIntLabel(java.lang.Object key)
Returns the label value associated with the passed key as int value. |
java.lang.Object |
getLabel(java.lang.Object key)
Returns the label value associated with the passed key, or null if the label Map does not contain a mapping for this key. |
java.util.Set |
getLabelKeySet()
Returns a Set which contains the Keys inside the LabelMap. |
java.lang.String |
getName()
Delivers a human readable name of this NetElement. |
NetElement |
getOriginal()
Delivers the NetElement from which this one was copied. |
de.fhstralsund.vinets.graphics.NetElementRepresentation |
getRepresentation()
Delivers the NetElementRepresentation instance containing information for rendering this NetElement. |
java.lang.Object |
removeLabel(java.lang.Object key)
Removes a property stored as label from this NetElement. |
void |
setBooleanLabel(java.lang.Object key,
boolean b)
Adds to this NetElement a boolean value label or changes it. |
void |
setData(java.lang.Object info)
Assigns new application specific data to this NetElement which have no relation to the network algorithms. |
void |
setDoubleLabel(java.lang.Object key,
double x)
Adds to this NetElement a double value label or changes it. |
void |
setGeometry(NetElementGeometry geom)
Assigns a new NetElementGeometry instance containing the position and the size of this NetElement in the relative coordinate system of its host. |
void |
setIntLabel(java.lang.Object key,
int i)
Adds to this NetElement an integer value label or changes it. |
void |
setLabel(java.lang.Object key,
java.lang.Object value)
Adds a new property to be stored as a label of this NetElement or changes the value of an existing property. |
void |
setName(java.lang.String name)
Sets a human readable name for this NetElement. |
void |
setRepresentation(de.fhstralsund.vinets.graphics.NetElementRepresentation pres)
Assigns a new NetElementRepresentation instance containing information for rendering this NetElement. |
Method Detail |
---|
java.lang.Object getID()
java.lang.String getName()
void setName(java.lang.String name)
name
- the name.NetElementGeometry getGeometry()
void setGeometry(NetElementGeometry geom)
geom
- a reference to the new NetElementGeometry.de.fhstralsund.vinets.graphics.NetElementRepresentation getRepresentation()
void setRepresentation(de.fhstralsund.vinets.graphics.NetElementRepresentation pres)
pres
- a reference to the graphic representation of this
NetElement.java.lang.Object getData()
void setData(java.lang.Object info)
info
- a reference to the external information to be stored.NetElement getHost()
NetElement getOriginal()
void setLabel(java.lang.Object key, java.lang.Object value)
key
- an Object with which the specified value is to be
associated.value
- an Object to be associated with the specified key.
java.lang.IllegalArgumentException
- if the key is null.java.lang.Object getLabel(java.lang.Object key)
key
- the key whose associated value is to be returned.
setLabel(Object, Object)
java.util.Set getLabelKeySet()
boolean containsLabel(java.lang.Object key)
key
- the key whose presence as label is to be tested.
setLabel(Object, Object)
java.lang.Object removeLabel(java.lang.Object key)
key
- the key of the property to remove.
setLabel(Object, Object)
void clearLabels()
void setIntLabel(java.lang.Object key, int i)
key
- an Object with which the integer value is to be
associated.i
- an int value to be associated with the specified
key.setLabel(Object, Object)
int getIntLabel(java.lang.Object key)
key
- the key whose associated integer value is to be returned.
getLabel(Object)
void setDoubleLabel(java.lang.Object key, double x)
key
- an Object with which the double value is to be
associated.x
- a double value to be associated with the
specified key.setLabel(Object, Object)
double getDoubleLabel(java.lang.Object key)
key
- the key whose associated double value is to be returned.
getLabel(Object)
void setBooleanLabel(java.lang.Object key, boolean b)
key
- an Object with which the boolean value is to be
associated.b
- true or false to be associated with
the specified key.setLabel(Object, Object)
boolean getBooleanLabel(java.lang.Object key)
key
- the key whose associated boolean value is to be returned.
getLabel(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |