|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfreerails.controller.FlatTrackExplorer
public class FlatTrackExplorer
GraphExplorer that explorers track, the ints it returns are encoded PositionOnTrack objects.
| Field Summary | |
|---|---|
private boolean |
beforeFirst
|
(package private) PositionOnTrack |
currentBranch
|
private PositionOnTrack |
currentPosition
|
private static long |
serialVersionUID
|
private ReadOnlyWorld |
w
|
| Constructor Summary | |
|---|---|
FlatTrackExplorer(ReadOnlyWorld world,
PositionOnTrack p)
|
|
| Method Summary | |
|---|---|
int |
getEdgeCost()
Returns the cost of the current edge. |
(package private) Step |
getFirstVectorToTry()
|
int |
getH()
|
int |
getPosition()
Return the current edge. |
static PositionOnTrack[] |
getPossiblePositions(ReadOnlyWorld w,
ImPoint p)
|
int |
getVertexConnectedByEdge()
Returns the vertex that is connected to the current vertex by the current edge. |
ReadOnlyWorld |
getWorld()
|
boolean |
hasNextEdge()
|
void |
moveForward()
Moves this GraphExplorer from the current vertex to the vertex that is connected to the current vertex by the current edge. |
void |
nextEdge()
Sets the current edge to the current vertex's next edge. |
void |
setPosition(int i)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private PositionOnTrack currentPosition
final PositionOnTrack currentBranch
private boolean beforeFirst
private final ReadOnlyWorld w
| Constructor Detail |
|---|
public FlatTrackExplorer(ReadOnlyWorld world,
PositionOnTrack p)
| Method Detail |
|---|
public ReadOnlyWorld getWorld()
public void setPosition(int i)
setPosition in interface GraphExplorerpublic int getPosition()
GraphExplorer
getPosition in interface GraphExplorerpublic void moveForward()
GraphExplorer
moveForward in interface GraphExplorerpublic void nextEdge()
GraphExplorer
nextEdge in interface GraphExplorerpublic int getVertexConnectedByEdge()
GraphExplorer
getVertexConnectedByEdge in interface GraphExplorerpublic int getEdgeCost()
GraphExplorer
getEdgeCost in interface GraphExplorerpublic boolean hasNextEdge()
hasNextEdge in interface GraphExplorer
public static PositionOnTrack[] getPossiblePositions(ReadOnlyWorld w,
ImPoint p)
p - location of track to consider.
Step getFirstVectorToTry()
public int getH()
getH in interface GraphExplorer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||