|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.dillenco.simplegraph01.QEdgeMap<V>
public final class QEdgeMap<V>
This class maps qEdges of a given graph to user-defined attributes.
it provides a scaled-down version
of mapping: only put
, get
, clear
,
and isEmpty
are supported.
Constructor Summary | |
---|---|
QEdgeMap(Graph g)
Create an empty QEdgeMap for the given graph. |
Method Summary | |
---|---|
void |
clear()
Remove all stored values in this map |
V |
get(HalfEdge halfEdge)
Retrieve the value associated with the QEdge to which the given HalfEdge belongs. |
V |
get(QEdge qEdge)
Retrieve the value associated with the given QEdge. |
boolean |
isEmpty()
Return whether this map is currently empty. |
V |
put(QEdge qEdge,
V value)
Store a <QEdge,V> pair. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QEdgeMap(Graph g)
g
- the graph with which this map is to be associated.Method Detail |
---|
public V put(QEdge qEdge, V value)
<QEdge,V> pair.
- Parameters:
qEdge
- the QEdge for the pair, which functions as the keyvalue
- the associated value
- Returns:
- the previous value associated with the QEdge,
or null if there was no previous mapping for the QEdge.
public V get(QEdge qEdge)
qEdge
- the qEdge
public V get(HalfEdge halfEdge)
get
(halfEdge.getQedge()}
halfEdge
- the HalfEdge
public void clear()
public boolean isEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |