public class Intersection extends Waypoint implements RoadObject
Modifier and Type | Class and Description |
---|---|
class |
Intersection.Graphic
Inner class for the visual representation of an Intersection.
|
Modifier and Type | Field and Description |
---|---|
static int |
GRID |
location, screenLocation
blinkState, layer
Constructor and Description |
---|
Intersection(LatLonPoint loc,
RoadLayer layer)
Create an Intersection at a given location.
|
Intersection(LatLonPoint loc,
java.lang.String name,
RoadLayer layer) |
Modifier and Type | Method and Description |
---|---|
void |
addRoad(Road road)
Add a road to this intersection.
|
void |
clear() |
boolean |
equals(java.lang.Object obj)
Override equals so that two Intersections at the same location
are the same Intersection.
|
static java.lang.Class |
getGraphicClass() |
static java.lang.String |
getLatLonPointName(LatLonPoint loc) |
java.lang.String |
getName() |
Road |
getRoad(int ix) |
int |
getRoadCount() |
java.util.Enumeration |
getRoads()
Get an enumeration of the roads at this intersection.
|
boolean |
getTerminalStatus() |
int |
hashCode()
Override hashCode so that two Intersections at the same
location have the same hashcode.
|
void |
merge(Intersection other)
Merge another intersection with this one.
|
void |
removeRoad(Road road) |
void |
render(OMGraphicList gl,
boolean forceNew)
Render the graphics for this intersection.
|
void |
renderRoads(OMGraphicList gl,
boolean forceNew)
Render the graphics for the roads leaving this intersection.
|
void |
setName(java.lang.String name) |
void |
setTerminalStatus(boolean yes) |
Intersection |
startMove(boolean shifted) |
java.lang.String |
toString() |
void |
update()
Mark this Visual as needing to have its visual representation
updated.
|
getLatitude, getLocation, getLongitude, getModified, getRoadLayer, getScreenLocation, moveTo, setLocation, setModified, setScreenLocation
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
blink, moveTo
public Intersection(LatLonPoint loc, RoadLayer layer)
loc
- the location of the intersection.public Intersection(LatLonPoint loc, java.lang.String name, RoadLayer layer)
public static java.lang.Class getGraphicClass()
public static java.lang.String getLatLonPointName(LatLonPoint loc)
public java.lang.String getName()
public void setName(java.lang.String name)
public void addRoad(Road road)
road
- The road to be added.public void removeRoad(Road road)
public int getRoadCount()
public void merge(Intersection other)
public void clear()
public java.util.Enumeration getRoads()
public Road getRoad(int ix)
public void setTerminalStatus(boolean yes)
public boolean getTerminalStatus()
public void render(OMGraphicList gl, boolean forceNew)
render
in interface RoadObject
render
in class Waypoint
public void renderRoads(OMGraphicList gl, boolean forceNew)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Intersection startMove(boolean shifted)
public void update()
Visual
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details