|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.visualization.decorators.EdgeWeightLabeller<E>
public class EdgeWeightLabeller<E>
A EdgeWeightLabeller applies a label to the edges of a Graph. All edge weights are integers; weights need not be unique. (The cost of not being unique is that there's no way to look up edges by weight.) Note that this stores information with the graph, and as such is not flexible to addition and substraction of nodes.
Constructor Summary | |
---|---|
EdgeWeightLabeller()
|
Method Summary | |
---|---|
void |
clear()
Clears all weights stored by this decorator. |
Number |
getNumber(E e)
|
int |
getWeight(E e)
Gets the weight of a particualr edge. |
Number |
removeWeight(E e)
Removes the weight stored by this decorator for the indicated edge e ,
and returns the value of this weight (or null if there was no
such weight for this edge). |
void |
setNumber(E e,
Number n)
|
void |
setWeight(E e,
int i)
Sets an edge to this weight. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EdgeWeightLabeller()
Method Detail |
---|
public int getWeight(E e)
e
- an edge that has been weighted.public void setWeight(E e, int i)
e
- the edgei
- the weight
if
- the edge is not part of the graphpublic Number removeWeight(E e)
e
,
and returns the value of this weight (or null
if there was no
such weight for this edge).
public void clear()
public Number getNumber(E e)
getNumber
in interface NumberEdgeValue<E>
e
- the edge to examine
edu.uci.ics.jung.graph.decorators.NumberEdgeValue#getNumber(edu.uci.ics.jung.graph.ArchetypeEdge)
public void setNumber(E e, Number n)
setNumber
in interface NumberEdgeValue<E>
e
- the edge whose value we're settingn
- the Number to which we're setting the edgeedu.uci.ics.jung.graph.decorators.NumberEdgeValue#setNumber(edu.uci.ics.jung.graph.ArchetypeEdge, java.lang.Number)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |