## com.bbn.openmap.tools.roads
Class Intersection

    java.lang.Object
      com.bbn.openmap.tools.roads.Visual
          com.bbn.openmap.tools.roads.Waypoint
              com.bbn.openmap.tools.roads.Intersection

All Implemented Interfaces:
  RoadObject, java.io.Serializable

public class Intersection
extends Waypoint
implements RoadObject

See Also:
  Serialized Form

Nested Class Summary
`class` `Intersection.Graphic` Inner class for the visual representation of an Intersection.

Field Summary
`static int` `GRID`

Fields inherited from class com.bbn.openmap.tools.roads.Waypoint
`location, screenLocation`

Fields inherited from class com.bbn.openmap.tools.roads.Visual
`blinkState, layer`

Constructor Summary
`Intersection(LatLonPoint loc, RoadLayer layer)` Create an Intersection at a given location.
`Intersection(LatLonPoint loc, java.lang.String name, RoadLayer layer)`

Method Summary
`void` `addRoad(Road road)` Add a road to this intersection.
`void` `clear()`
`boolean` `equals(java.lang.Object other)` 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.

Methods inherited from class com.bbn.openmap.tools.roads.Waypoint
`getLatitude, getLocation, getLongitude, getModified, getRoadLayer, getScreenLocation, moveTo, setLocation, setModified, setScreenLocation`

Methods inherited from class com.bbn.openmap.tools.roads.Visual
`blink, getVisual, setVisual`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.bbn.openmap.tools.roads.RoadObject
`blink, moveTo`

Field Detail

### GRID

    public static int GRID

Constructor Detail

### Intersection

    public Intersection(LatLonPoint loc,
                        RoadLayer layer)

  Create an Intersection at a given location.

Parameters:
  `loc` - the location of the intersection.

### Intersection

    public Intersection(LatLonPoint loc,
                        java.lang.String name,
                        RoadLayer layer)

Method Detail

### getGraphicClass

    public static java.lang.Class getGraphicClass()

### getLatLonPointName

    public static java.lang.String getLatLonPointName(LatLonPoint loc)

### getName

    public java.lang.String getName()

### setName

    public void setName(java.lang.String name)

### addRoad

    public void addRoad(Road road)

  Add a road to this intersection.

  Parameters:
    `road` - The road to be added.

### removeRoad

    public void removeRoad(Road road)

### getRoadCount

    public int getRoadCount()

### merge

    public void merge(Intersection other)

  Merge another intersection with this one. All the roads of the other intersection are removed and added onto this.

### clear

    public void clear()

### getRoads

    public java.util.Enumeration getRoads()

  Get an enumeration of the roads at this intersection.

### getRoad

    public Road getRoad(int ix)

### setTerminalStatus

    public void setTerminalStatus(boolean yes)

### getTerminalStatus

    public boolean getTerminalStatus()

### render

    public void render(OMGraphicList gl,
                       boolean forceNew)

  Render the graphics for this intersection.

  Specified by:
    `render` in interface `RoadObject`
  Specified by:
    `render` in class `Waypoint`

### renderRoads

    public void renderRoads(OMGraphicList gl,
                            boolean forceNew)

  Render the graphics for the roads leaving this intersection.

### equals

    public boolean equals(java.lang.Object other)

  Override equals so that two Intersections at the same location are the same Intersection.

### hashCode

    public int hashCode()

  Override hashCode so that two Intersections at the same location have the same hashcode.

### startMove

    public Intersection startMove(boolean shifted)

### update

    public void update()

  Description copied from class: `Visual`
  Mark this Visual as needing to have its visual representation updated. It has moved or otherwise changed its appearance.

  Overrides:
    `update` in class `Waypoint`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Waypoint`

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details