Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.network.lod
Class PointOnNet

java.lang.Object
  extended by oracle.spatial.network.lod.PointOnNet

Direct Known Subclasses:
HeavyPointOnNet

public class PointOnNet
extends java.lang.Object

This class defines the methods supported by a point on a network. A point on a network can fall on a node or in the middle of a link.

Since:
11gR1

Constructor Summary
PointOnNet(long nodeId)
          Constructs a PointOnNet for a node.
PointOnNet(long linkId, double percentage)
          Constructs a PointOnNet for a point on link.
PointOnNet(long linkId, double percentage, UserData userData)
          Constructs a PointOnNet for a point on link.
PointOnNet(long nodeId, UserData userData)
          Constructs a PointOnNet for a node.

 

Method Summary
 boolean equals(java.lang.Object o)
           
 long getLinkId()
          Returns the link ID, if the point falls on a link.
 long getNodeId()
          Returns the node ID, if the point falls on a node.
 double getPercentage()
          Returns the percentage on the link, if the point falls on a link.
 UserData getUserData()
          Returns the user data associated with this point on net.
 int hashCode()
           
 boolean isNode()
          Checks whether this point falls on a node or not.
 boolean isPointOnLink()
          Checks whether this point falls on a link or not.
 void removeUserData()
          Removes all user data associated to this object.
 void setUserData(UserData userData)
          Set user data.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

PointOnNet

public PointOnNet(long nodeId)
Constructs a PointOnNet for a node.
Parameters:
nodeId - node ID

PointOnNet

public PointOnNet(long linkId,
                  double percentage)
Constructs a PointOnNet for a point on link.
Parameters:
linkId - link ID
percentage - percentage on the link

PointOnNet

public PointOnNet(long nodeId,
                  UserData userData)
Constructs a PointOnNet for a node.
Parameters:
nodeId - node ID
userData - user data

PointOnNet

public PointOnNet(long linkId,
                  double percentage,
                  UserData userData)
Constructs a PointOnNet for a point on link.
Parameters:
linkId - link ID
percentage - percentage on the link
userData - user data

Method Detail

isNode

public boolean isNode()
Checks whether this point falls on a node or not.
Returns:
true if the point falls on a node; false, if the point falls on a link.

isPointOnLink

public boolean isPointOnLink()
Checks whether this point falls on a link or not.
Returns:
true if the point falls on a link; false, if the point falls on a node.

getNodeId

public long getNodeId()
Returns the node ID, if the point falls on a node.
Returns:
the node ID, if the point falls on a node.

getLinkId

public long getLinkId()
Returns the link ID, if the point falls on a link.
Returns:
the link ID, if the point falls on a link.

getPercentage

public double getPercentage()
Returns the percentage on the link, if the point falls on a link.
Returns:
the percentage on the link, if the point falls on a link.

getUserData

public UserData getUserData()
Returns the user data associated with this point on net.
Returns:
user data

setUserData

public void setUserData(UserData userData)
Set user data. Overwrite previous value, if the user data already exists.
Parameters:
userData - user data

removeUserData

public void removeUserData()
Removes all user data associated to this object.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.