Package oracle.spatial.network.lod
Class FeatureElementImpl
- java.lang.Object
-
- oracle.spatial.network.lod.FeatureElementImpl
-
- All Implemented Interfaces:
java.lang.Cloneable,FeatureElement
public class FeatureElementImpl extends java.lang.Object implements FeatureElement
Default implementation of FeatureElement.- Since:
- 12.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface oracle.spatial.network.lod.FeatureElement
FeatureElement.FeatureElementType
-
-
Constructor Summary
Constructors Constructor Description FeatureElementImpl(long nodeId)Constructs a POINT_ON_NODE type feature element.FeatureElementImpl(long linkId, double percentage)Constructs a POINT_ON_LINK type feature element.FeatureElementImpl(long linkId, double startPercentage, double endPercentage)Constructs a LINE type feature element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Support cloneablebooleanequals(java.lang.Object o)doublegetEndPercentage()Returns the end percentage of the feature element.longgetLinkId()Returns the ID of the link on which the feature element is defined.longgetNodeId()Returns the ID of the node on which the feature element is defined.doublegetPercentage()doublegetStartPercentage()Returns the start percentage of the feature element.FeatureElement.FeatureElementTypegetType()Returns the type of the feature element.java.lang.StringtoString()
-
-
-
Constructor Detail
-
FeatureElementImpl
public FeatureElementImpl(long linkId, double percentage)Constructs a POINT_ON_LINK type feature element.- Parameters:
linkId- ID of the linkpercentage- percentage of the point along the link
-
FeatureElementImpl
public FeatureElementImpl(long linkId, double startPercentage, double endPercentage)Constructs a LINE type feature element.- Parameters:
linkId- ID of the linkstartPercentage- start percentage of the line along the linkendPercentage- end percentage of the line along the link
-
FeatureElementImpl
public FeatureElementImpl(long nodeId)
Constructs a POINT_ON_NODE type feature element.- Parameters:
nodeId- ID of the node.
-
-
Method Detail
-
getType
public FeatureElement.FeatureElementType getType()
Description copied from interface:FeatureElementReturns the type of the feature element.- Specified by:
getTypein interfaceFeatureElement- Returns:
-
getLinkId
public long getLinkId()
Description copied from interface:FeatureElementReturns the ID of the link on which the feature element is defined. This method is meaningless for feature elements of type POINT_ON_NODE.- Specified by:
getLinkIdin interfaceFeatureElement- Returns:
-
getNodeId
public long getNodeId()
Description copied from interface:FeatureElementReturns the ID of the node on which the feature element is defined. This method is only meaningful for feature elements of type POINT_ON_NODE.- Specified by:
getNodeIdin interfaceFeatureElement- Returns:
-
getStartPercentage
public double getStartPercentage()
Description copied from interface:FeatureElementReturns the start percentage of the feature element. For feature elements of type POINT_ON_NODE, the returned value is ignored; For feature elements of type POINT_ON_LINK, this method returns the percentage of the point along the link; For feature elements of type LINE, this method returns the start percentage of the line along the link.- Specified by:
getStartPercentagein interfaceFeatureElement- Returns:
-
getEndPercentage
public double getEndPercentage()
Description copied from interface:FeatureElementReturns the end percentage of the feature element. For feature elements of type POINT_ON_NODE, the returned value is ignored; For feature elements of type POINT_ON_LINK, the returned value is ignored; For feature elements of type LINE, this method returns the end percentage of the line along the link.- Specified by:
getEndPercentagein interfaceFeatureElement- Returns:
-
getPercentage
public double getPercentage()
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:FeatureElementSupport cloneable- Specified by:
clonein interfaceFeatureElement- Overrides:
clonein classjava.lang.Object- Returns:
- cloned object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-