Class IntersectionMember<V>
- java.lang.Object
-
- oracle.spatial.network.nfe.model.spatial.interaction.IntersectionMember<V>
-
- Type Parameters:
V- The type of the intersection member
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
LineIntersectionMember,PointIntersectionMember
public abstract class IntersectionMember<V> extends java.lang.Object implements java.lang.CloneableHolds the information of an element participating in an intersection interaction along with the information of how the element is intersected.
-
-
Field Summary
Fields Modifier and Type Field Description protected doubledistToComInterPointprotected Velementprotected JGeometrygeometryprotected longidprotected IntersectionLocationintersectionLocation
-
Constructor Summary
Constructors Constructor Description IntersectionMember(V element, JGeometry geometry)Allocates a new intersection member
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()doublegetDistToInterCommonPoint()Gets the distance from the element's intersected point to the point considered as the origin of the intersectionVgetElement()Gets the intersection's elementJGeometrygetGeometry()Gets the geometry of the intersection's elementlonggetId()Gets the member's idIntersectionLocationgetIntersectionLocation()Gets the element's location where the intersection takes placeabstract java.awt.geom.Point2DgetIntersectionPoint()Gets the spatial point where the element is intersected.protected static longgetNextId()abstract booleanisLine()Tells whether the element held is a lineabstract booleanisPoint()Tells whether the element held is a pointvoidsetDistToInterCommonPoint(double distToComInterPoint)Sets the distance from the element's intersected point to the point considered as the origin of the intersectionvoidsetElement(V element)Sets the intersection's elementvoidsetGeometry(JGeometry geometry)Sets the geometry of the intersection's elementvoidsetIntersectionLocation(IntersectionLocation intersectionLocation)Sets the element's location where the intersection takes place
-
-
-
Field Detail
-
id
protected long id
-
element
protected V element
-
geometry
protected JGeometry geometry
-
intersectionLocation
protected IntersectionLocation intersectionLocation
-
distToComInterPoint
protected double distToComInterPoint
-
-
Method Detail
-
getNextId
protected static long getNextId()
-
getId
public long getId()
Gets the member's id- Returns:
- the member's id
-
getElement
public V getElement()
Gets the intersection's element- Returns:
- the intersection's element
-
setElement
public void setElement(V element)
Sets the intersection's element- Parameters:
element- the intersection's element
-
getGeometry
public JGeometry getGeometry()
Gets the geometry of the intersection's element- Returns:
- the geometry of the intersection's element
-
setGeometry
public void setGeometry(JGeometry geometry)
Sets the geometry of the intersection's element- Parameters:
geometry- the geometry of the intersection's element
-
getIntersectionLocation
public IntersectionLocation getIntersectionLocation()
Gets the element's location where the intersection takes place- Returns:
- an intersection location type
-
setIntersectionLocation
public void setIntersectionLocation(IntersectionLocation intersectionLocation)
Sets the element's location where the intersection takes place- Parameters:
intersectionLocation- an intersection location type
-
getDistToInterCommonPoint
public double getDistToInterCommonPoint()
Gets the distance from the element's intersected point to the point considered as the origin of the intersection- Returns:
- the distance to the intersection common point
-
setDistToInterCommonPoint
public void setDistToInterCommonPoint(double distToComInterPoint)
Sets the distance from the element's intersected point to the point considered as the origin of the intersection- Parameters:
distToComInterPoint- the distance to the intersection's common point
-
isLine
public abstract boolean isLine()
Tells whether the element held is a line- Returns:
- true if the element is a line
-
isPoint
public abstract boolean isPoint()
Tells whether the element held is a point- Returns:
- true if the element is a point
-
getIntersectionPoint
public abstract java.awt.geom.Point2D getIntersectionPoint()
Gets the spatial point where the element is intersected.- Returns:
- a java point
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-