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.Object
clone()
Support cloneableboolean
equals(java.lang.Object o)
double
getEndPercentage()
Returns the end percentage of the feature element.long
getLinkId()
Returns the ID of the link on which the feature element is defined.long
getNodeId()
Returns the ID of the node on which the feature element is defined.double
getPercentage()
double
getStartPercentage()
Returns the start percentage of the feature element.FeatureElement.FeatureElementType
getType()
Returns the type of the feature element.java.lang.String
toString()
-
-
-
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:FeatureElement
Returns the type of the feature element.- Specified by:
getType
in interfaceFeatureElement
- Returns:
-
getLinkId
public long getLinkId()
Description copied from interface:FeatureElement
Returns 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:
getLinkId
in interfaceFeatureElement
- Returns:
-
getNodeId
public long getNodeId()
Description copied from interface:FeatureElement
Returns 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:
getNodeId
in interfaceFeatureElement
- Returns:
-
getStartPercentage
public double getStartPercentage()
Description copied from interface:FeatureElement
Returns 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:
getStartPercentage
in interfaceFeatureElement
- Returns:
-
getEndPercentage
public double getEndPercentage()
Description copied from interface:FeatureElement
Returns 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:
getEndPercentage
in interfaceFeatureElement
- Returns:
-
getPercentage
public double getPercentage()
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Description copied from interface:FeatureElement
Support cloneable- Specified by:
clone
in interfaceFeatureElement
- Overrides:
clone
in classjava.lang.Object
- Returns:
- cloned object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-