|
|||
PREV CLASS NEXT CLASS | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.ethz.graphbench.toolbox.Vertex
Class representing a vertex in 2D eucledian space.
A new vertex cannot be instanciated directly, use the method
createVertex() from the class Graph instead.
Field Summary | |
static int |
ACTIVE_STATE
Specifies that the vertex is currently active |
static java.awt.Color |
DEFAULT_VERTEX_COLOR
Default color of a vertex |
static int |
INVALID_STATE
Specifies that the vertex is invalid |
static int |
PROCESSED_STATE
Specifies that the vertex has been processed |
static int |
QUEUED_STATE
Specifies that the vertex is currently queued |
static int |
VALID_STATE
Specifies that the vertex is valid |
static int |
VOID_STATE
Specifies that the edge is currently active |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Checks if the passed object is equal to the vertex object. |
java.awt.Color |
getColor()
Gets the color of the vertex |
int |
getDegree()
Gets the degree of the vertex |
java.util.Iterator |
getEdgeIterator()
Returns an iterator over all edges adjacent to the vertex. |
int |
getIndex()
Gets the index of the vertex |
java.lang.String |
getName()
Gets the name of the vertex |
java.awt.Point |
getPosition()
Gets the position of the vertex |
java.lang.Object |
getUserData(java.lang.Object key)
Returns the value to which the specified key is mapped. |
int |
getVertexState()
Gets the state of the vertex |
void |
putUserData(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value. |
void |
resetVertexState()
Resets the state of the vertex. |
void |
setColor(java.awt.Color color)
Sets the color of the vertex |
void |
setName(java.lang.String name)
Sets the name attribute of the vertex |
void |
setPosition(java.awt.Point position)
Sets the position of the vertex |
void |
setVertexState(int state)
Sets the state of the vertex. Valid states are: QUEUED_STATE, ACTIVE_STATE and PROCESSED_STATE. A vertex can only be in one state at any given time. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.awt.Color DEFAULT_VERTEX_COLOR
public static final int ACTIVE_STATE
public static final int QUEUED_STATE
public static final int PROCESSED_STATE
public static final int VOID_STATE
public static final int VALID_STATE
public static final int INVALID_STATE
Method Detail |
public void setName(java.lang.String name)
name
- The new namepublic void setColor(java.awt.Color color)
color
- The new colorpublic void setPosition(java.awt.Point position)
position
- The new positionpublic void setVertexState(int state)
state
- The new state of the vertexpublic void resetVertexState()
public int getIndex()
public java.lang.String getName()
public java.lang.Object getUserData(java.lang.Object key)
key
- key identifying value to be returnedpublic java.awt.Color getColor()
public int getDegree()
public java.util.Iterator getEdgeIterator()
public int getVertexState()
public java.awt.Point getPosition()
public void putUserData(java.lang.Object key, java.lang.Object value)
key
- the keyvalue
- the valuepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to be comparedtrue
if object is equal, false
otherwise
|
|||
PREV CLASS NEXT CLASS | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |