|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscg.ac.ni.pmf.newgraph.graphdata.Edge
public class Edge
Represents a graph edge. The edge is defined by the vertices that are connected by it. Although the edge that the class represents is not directed, the vertices are named vertex A and vertex B. However, two edges where vertices A are equal to vertices B are considered equal, to preserve the non-directionability of the edge representation.
EdgeData
,
Graph
,
Serialized FormMethod Summary | |
---|---|
void |
delete()
Deletes the edge. |
void |
deselect()
Deselects this element. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is equal to this one. |
EdgeData |
getData()
Retrieves the edge data. |
int |
getIDA()
Retrieves the ID of the vertex A. |
int |
getIDB()
Retrieves the ID of the vertex B. |
int |
getMultiplicity()
Retrieves the multiplicity of the edge. |
Vertex |
getVertexA()
Retrieves the vertex A. |
Vertex |
getVertexB()
Retrieves the vertex B. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isIncident(int id)
Retrieves is the specified vertex incident with the edge. |
boolean |
isIncident(Vertex v)
Retrieves is the specified vertex incident with the edge. |
boolean |
isPrimarySelected()
Retrieves is the edge primary selected. |
boolean |
isSelected()
Retrieves is the edge selected. |
void |
select()
Selects this element. |
void |
setMultiplicity(int multiplicity)
Sets the edge multiplicity. |
void |
setPrimarySelected()
Sets the edge as primary selected. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public EdgeData getData()
public int getIDA()
public int getIDB()
public int getMultiplicity()
public boolean isIncident(int id)
id
- The ID of the vertex.
public boolean isIncident(Vertex v)
v
- The vertex.
public Vertex getVertexA()
public Vertex getVertexB()
public void delete()
delete
in interface Element
Element.delete()
public void setMultiplicity(int multiplicity)
multiplicity
- The edge multiplicity.public void select()
select
in interface Element
public void deselect()
deselect
in interface Element
public void setPrimarySelected()
setPrimarySelected
in interface Element
Element.setPrimarySelected()
public boolean isSelected()
isSelected
in interface Element
public boolean isPrimarySelected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |