ID - the ID type.P - the point type, e.g., com.vividsolutions.jts.geom.Point, DirectedPoint.public abstract class AbstractNode<ID,P> extends Object implements Node<ID,P>, LocatableInterface, Serializable
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
AbstractNode(ID id,
P point)
Construction of a Node.
|
AbstractNode(ID id,
P point,
DoubleScalar.Abs<AnglePlaneUnit> direction,
DoubleScalar.Abs<AngleSlopeUnit> slope)
Construction of a Node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLinkIn(Link<?,? extends Node<ID,P>> linkIn)
Add an incoming link to this Node.
|
void |
addLinkOut(Link<?,? extends Node<ID,P>> linkOut)
Add an outgoing link to this Node.
|
boolean |
equals(Object obj) |
Bounds |
getBounds() |
DoubleScalar.Abs<AnglePlaneUnit> |
getDirection() |
ID |
getId() |
Set<Link<?,? extends Node<ID,P>>> |
getLinksIn() |
Set<Link<?,? extends Node<ID,P>>> |
getLinksOut() |
DirectedPoint |
getLocation() |
P |
getPoint() |
DoubleScalar.Abs<AngleSlopeUnit> |
getSlope() |
abstract double |
getX() |
abstract double |
getY() |
abstract double |
getZ() |
int |
hashCode() |
String |
toString() |
public AbstractNode(ID id, P point, DoubleScalar.Abs<AnglePlaneUnit> direction, DoubleScalar.Abs<AngleSlopeUnit> slope)
id - the id of the Node.point - the point with usually an x and y setting.direction - the 3D direction. "East" is 0 degrees. "North" is 90 degrees (1/2 pi radians).slope - the slope as an angle.public abstract double getX()
public abstract double getY()
public abstract double getZ()
public final void addLinkIn(Link<?,? extends Node<ID,P>> linkIn)
public final void addLinkOut(Link<?,? extends Node<ID,P>> linkOut)
addLinkOut in interface Node<ID,P>linkOut - the link to add.public final Set<Link<?,? extends Node<ID,P>>> getLinksIn()
getLinksIn in interface Node<ID,P>public final Set<Link<?,? extends Node<ID,P>>> getLinksOut()
getLinksOut in interface Node<ID,P>public final DoubleScalar.Abs<AnglePlaneUnit> getDirection()
getDirection in interface Node<ID,P>public final DoubleScalar.Abs<AngleSlopeUnit> getSlope()
public final DirectedPoint getLocation() throws RemoteException
getLocation in interface LocatableInterfaceRemoteExceptionpublic final Bounds getBounds() throws RemoteException
getBounds in interface LocatableInterfaceRemoteExceptionCopyright © 2014–2015 Delft University of Technology. All rights reserved.