|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.graph.core.GraphElement | +--gishur.graph.core.Edge
The basic Edge
class for arbitrary Graphs
. Most of its
functionality is inherited from GraphElement
, e.g. the property handling
methods and the connection handling.
Fields inherited from class gishur.graph.core.GraphElement |
ACCESS_CONNECT, ACCESS_REMOVE, BOTH, DETAILED, IN, LINK_ALL, NORMAL, OUT, SET_KEY, SET_VALUE, SHORT, VERY_DETAILED |
Fields inherited from interface gishur.core.ControlledCloneable |
DEEP, FLAT |
Constructor Summary | |
Edge()
Empty constructor, returns a new, unnamed Edge . |
|
Edge(int i)
Constructs an Edge with the i 'th automatically generated name. |
|
Edge(java.lang.String name)
Constructor returning a Node named with the given name . |
|
Edge(java.lang.String name,
java.lang.Object key)
Constructor returning a Node named with the given name
and with key key . |
|
Edge(java.lang.String name,
java.lang.Object key,
java.lang.Object value)
Constructor returning a Node named with the given name
and with key key and value value . |
Method Summary | |
protected boolean |
checkAccess(int access,
java.lang.Object argument)
Overrides GraphElement.checkAccess(int, java.lang.Object) . |
static java.lang.String |
generateName(int i)
Get generic name. |
Node |
opposite(GraphElement u)
Returns the Node which is connected opposite to u
to this Edge , i.e. the target node if u is the source
and vice versa. |
Node |
source()
Returns the source Node of this Edge . |
Node |
target()
Returns the target Node of this Edge . |
java.lang.String |
toString(int level)
Returns a string representation of this Edge in a definable level of
detail. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Edge()
Edge
.public Edge(int i)
Edge
with the i
'th automatically generated name.public Edge(java.lang.String name)
Node
named with the given name
.public Edge(java.lang.String name, java.lang.Object key)
Node
named with the given name
and with key key
.public Edge(java.lang.String name, java.lang.Object key, java.lang.Object value)
Node
named with the given name
and with key key
and value value
.Method Detail |
public static final java.lang.String generateName(int i)
i
- the instancenumberpublic java.lang.String toString(int level)
Edge
in a definable level of
detail. level
can be one of the constants GraphElement.SHORT
,GraphElement.NORMAL
,
GraphElement.DETAILED
or GraphElement.VERY_DETAILED
. For information about these
levels, see GraphElement.toString(int)
. The link list representation
consists here of a partial string of the form source->target
.toString
in class GraphElement
level
- the requested level of detail: GraphElement.SHORT
,GraphElement.NORMAL
,
GraphElement.DETAILED
or GraphElement.VERY_DETAILED
Edge
public Node source()
Node
of this Edge
.Node
public Node target()
Node
of this Edge
.Node
public Node opposite(GraphElement u)
Node
which is connected opposite to u
to this Edge
, i.e. the target node if u
is the source
and vice versa.u
- a Node
adjacent to this Edge
Node
, if u
is adjacent to
this Edge
or null
otherwiseprotected boolean checkAccess(int access, java.lang.Object argument)
GraphElement.checkAccess(int, java.lang.Object)
. The method returns
true
, if argument
is of type Node
,
false
otherwise.checkAccess
in class GraphElement
access
- an access constant specifying the requested operationargument
- the argument of the requested operationtrue
, if the operation is allowed, false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |