|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.CursorAdapter | +--gishur.graph.core.GraphCursor | +--gishur.graph.core.GraphElementCursor
A GraphCursor
, that enumerates the connected
GraphElements
of a given GraphElement
.
One may not instantiate this class directly; use the methods
Graph.outEdges(gishur.graph.core.Node)
, Graph.inEdges(gishur.graph.core.Node)
, Graph.edges()
...
of the Graph
class instead.
Method Summary | |
java.lang.Object |
element()
Returns the element to which this Cursor points at the moment. |
java.lang.Object |
getBookmark()
Returns a bookmark-object. |
Graph |
graph()
Returns the Graph , on which the Cursor works. |
GraphElement |
graphElement()
Returns the element under the actual position as an GraphElement ,
if this is possible (i.e. the position is valid and points to an
GraphElement . |
void |
invalidate()
Sets the Cursor to an invalid position. |
int |
length()
Returns the number of elements in the underlying structure of this Cursor . |
void |
relative(int step)
Moves the Cursor step positions within the underlying
structure. |
void |
set(GraphElement e)
Sets the GraphCursor to a new start element.
|
void |
set(java.lang.Object bookmark)
Sets the cursor to a bookmarked position. |
boolean |
valid()
Checks if the Cursor's actual position is valid. |
Methods inherited from class gishur.graph.core.GraphCursor |
addFilter, edge, filter, isEdge, isNode, node, removeFilter, validElement |
Methods inherited from class gishur.core.CursorAdapter |
bottom, hasMoreElements, next, next, nextElement, prev, prev, set, top |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void set(GraphElement e)
GraphCursor
to a new start element.
This method should be overwritten properly. Otherwise a
GraphException
will be thrown.set
in class GraphCursor
e
- the new GraphElement
to set the cursor topublic Graph graph()
Graph
, on which the Cursor
works.graph
in class GraphCursor
Graph
, on which the Cursor
works.public GraphElement graphElement()
GraphElement
,
if this is possible (i.e. the position is valid and points to an
GraphElement
.graphElement
in class GraphCursor
Edge
public java.lang.Object element()
Cursor
points at the moment.Cursor
public void relative(int step)
Cursor
step
positions within the underlying
structure.step
- the number of elements to movepublic boolean valid()
Cursor's
actual position is valid.true
, if the Cursor
points to a
valid position, and false
otherwisepublic void invalidate()
Cursor
to an invalid position.public int length()
Cursor
.public java.lang.Object getBookmark()
this
!.getBookmark
in class CursorAdapter
setBookmark
public void set(java.lang.Object bookmark)
this
cursor!set
in class CursorAdapter
bookmark
- a bookmark-objectgetBookmark()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |