Class FeatureElementImpl

  • All Implemented Interfaces:
    java.lang.Cloneable, FeatureElement

    public class FeatureElementImpl
    extends java.lang.Object
    implements FeatureElement
    Default implementation of FeatureElement.
    Since:
    12.1
    • Constructor Detail

      • FeatureElementImpl

        public FeatureElementImpl​(long linkId,
                                  double percentage)
        Constructs a POINT_ON_LINK type feature element.
        Parameters:
        linkId - ID of the link
        percentage - 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 link
        startPercentage - start percentage of the line along the link
        endPercentage - 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

      • 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 interface FeatureElement
        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 interface FeatureElement
        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 interface FeatureElement
        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 interface FeatureElement
        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 interface FeatureElement
        Overrides:
        clone in class java.lang.Object
        Returns:
        cloned object
        Throws:
        java.lang.CloneNotSupportedException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object