public class PointOnNet
extends java.lang.Object
double xCoordinate = -122.45; double yCoordinate = 37.77; PointOnNet point = new PointOnNet(linkId, percentage); Object[] userDataObjects = {xCoordinate, yCoordinate}; UserData userData = new UserDataImpl(userDataObjects); point.setUserData(userData);
Constructor and Description |
---|
PointOnNet(long nodeId)
Constructs a PointOnNet for a node.
|
PointOnNet(long nodeId, CategorizedUserData cud)
Constructs a PointOnNet for a node.
|
PointOnNet(long linkId, double percentage)
Constructs a PointOnNet for a point on link.
|
PointOnNet(long linkId, double percentage, CategorizedUserData cud)
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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Support cloneable
|
boolean |
equals(java.lang.Object o) |
CategorizedUserData |
getCategorizedUserData()
Returns categorized user data.
|
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 in the default user data category.
|
UserData |
getUserData(int category)
Returns user data for the specified category.
|
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 |
setCategorizedUserData(CategorizedUserData cud)
Sets categorized user data.
|
void |
setUserData(int category, UserData userData)
Sets user data for the specified category.
|
void |
setUserData(UserData userData)
Sets user data.
|
java.lang.String |
toString() |
public PointOnNet(long nodeId)
nodeId
- node IDpublic PointOnNet(long linkId, double percentage)
linkId
- link IDpercentage
- percentage on the linkpublic PointOnNet(long nodeId, CategorizedUserData cud)
nodeId
- node IDcud
- categorized user datapublic PointOnNet(long nodeId, UserData userData)
nodeId
- node IDuserData
- user datapublic PointOnNet(long linkId, double percentage, CategorizedUserData cud)
linkId
- link IDpercentage
- percentage on the linkcud
- categorized user datapublic PointOnNet(long linkId, double percentage, UserData userData)
linkId
- link IDpercentage
- percentage on the linkuserData
- user datapublic boolean isNode()
public boolean isPointOnLink()
public long getNodeId()
public long getLinkId()
public double getPercentage()
public UserData getUserData()
public void setUserData(UserData userData)
userData
- user datapublic void removeUserData()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public CategorizedUserData getCategorizedUserData()
public void setCategorizedUserData(CategorizedUserData cud)
public UserData getUserData(int category)
public void setUserData(int category, UserData userData)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException