public class LogicalNetNodeImpl extends java.lang.Object implements LogicalNetNode
| Constructor and Description |
|---|
LogicalNetNodeImpl(long id, int partitionId, int linkLevel, double cost, boolean isActive, int maxLinkLevel, int numInLinks, int numOutLinks, CategorizedUserData userData)
Constructs a LogicalNetNode object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInLink(LogicalNetLink link)
Adds an incoming link to this node.
|
void |
addOutLink(LogicalNetLink link)
Adds an outgoing link to this node.
|
java.lang.Object |
clone()
Support cloneable
|
long[] |
getAdjacentNodeIds(boolean activeOnly)
Returns the IDs of all the nodes with a direct link to or from this node.
|
CategorizedUserData |
getCategorizedUserData()
Returns categorized user data.
|
CategorizedUserData |
getCategorizedUserData()
Returns categorized user data.
|
double |
getCost()
Returns the cost of this node.
|
long |
getId()
Returns the node ID
|
LogicalNetLink[] |
getIncidentLinks(boolean activeOnly)
Returns the IDs of all the links incident to this node.
|
LogicalNetLink[] |
getInLinks(boolean activeOnly)
Returns the array of incoming links to this node.
|
int |
getLinkLevel()
Returns the link level of the containing partition.
|
int |
getMaxLinkLevel()
Returns the maximum link level of the links incident to this node.
|
long[] |
getNextNodeIds(boolean activeOnly)
Returns the IDs of all the nodes with a direct link from this node.
|
int |
getNumberOfInLinks()
Returns the number of incoming links.
|
int |
getNumberOfOutLinks()
Returns the number of outgoing links.
|
LogicalNetLink[] |
getOutLinks(boolean activeOnly)
Returns the array of outgoing links from this node.
|
int |
getPartitionId()
Returns the partition ID.
|
long[] |
getPreviousNodeIds(boolean activeOnly)
Returns the IDs of all the nodes with a direct link to this node.
|
UserData |
getUserData(int category)
Returns user data for the specified category.
|
UserData |
getUserData(int category)
Returns user data for the specified category.
|
boolean |
isActive()
Checks whether the node is active.
|
boolean |
isDummyExternalNode()
Returns true if the net node object is an external node and
|
boolean |
isPartiallyLoaded()
Use max link level as an indicator for whether a node is external.
|
void |
removeInLink(long linkId)
Removes the incoming link with the specified link ID.
|
void |
removeOutLink(long linkId)
Removes the outgoing link with the specified link ID.
|
void |
setCategorizedUserData(CategorizedUserData userData)
Sets categorized user data.
|
void |
setCategorizedUserData(CategorizedUserData cud)
Sets categorized user data.
|
void |
setCost(double cost)
Sets the cost of this node.
|
void |
setIsActive(boolean isActive)
Sets whether this node is active.
|
void |
setMaxLinkLevel(int maxLinkLevel)
Sets the maximum link level of the links incident to this node.
|
void |
setPartitionId(int partitionId)
Sets the partition ID.
|
void |
setUserData(int category, UserData userData)
Sets user data for the specified category.
|
void |
setUserData(int category, UserData userData)
Sets user data for the specified category.
|
LogicalNode |
toStandAloneNode()
Returns a new instance of a standalone node, which has the same properties as this node.
|
void |
update(LogicalNode node)
Copies the attributes of the input node to this node.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCost, getId, getMaxLinkLevel, isActive, setCost, setIsActive, setMaxLinkLevel, update
public LogicalNetNodeImpl(long id,
int partitionId,
int linkLevel,
double cost,
boolean isActive,
int maxLinkLevel,
int numInLinks,
int numOutLinks,
CategorizedUserData userData)
id - ID of the nodepartitionId - the partition which the node belongs tolinkLevel - link level of the partitioncost - cost of the nodeisActive - whether the node is activemaxLinkLevel - maximum link levelnumInLinks -numOutLinks -userData -public int getLinkLevel()
LogicalNetNodegetLinkLevel in interface LogicalNetNodepublic int getPartitionId()
LogicalNetNodegetPartitionId in interface LogicalNetNodepublic void setPartitionId(int partitionId)
LogicalNetNodesetPartitionId in interface LogicalNetNodepublic LogicalNetLink[] getInLinks(boolean activeOnly)
LogicalNetNodegetInLinks in interface LogicalNetNodepublic LogicalNetLink[] getOutLinks(boolean activeOnly)
LogicalNetNodegetOutLinks in interface LogicalNetNodepublic LogicalNetLink[] getIncidentLinks(boolean activeOnly)
LogicalNetNodegetIncidentLinks in interface LogicalNetNodepublic int getNumberOfInLinks()
LogicalNetNodegetNumberOfInLinks in interface LogicalNetNodepublic int getNumberOfOutLinks()
LogicalNetNodegetNumberOfOutLinks in interface LogicalNetNodepublic void addInLink(LogicalNetLink link)
LogicalNetNodeaddInLink in interface LogicalNetNodelink - incoming linkpublic void addOutLink(LogicalNetLink link)
LogicalNetNodeaddOutLink in interface LogicalNetNodelink - outgoing linkpublic long[] getPreviousNodeIds(boolean activeOnly)
LogicalNetNodegetPreviousNodeIds in interface LogicalNetNodepublic long[] getNextNodeIds(boolean activeOnly)
LogicalNetNodegetNextNodeIds in interface LogicalNetNodepublic long[] getAdjacentNodeIds(boolean activeOnly)
LogicalNetNodegetAdjacentNodeIds in interface LogicalNetNodepublic void removeInLink(long linkId)
LogicalNetNoderemoveInLink in interface LogicalNetNodelinkId - link IDpublic void removeOutLink(long linkId)
LogicalNetNoderemoveOutLink in interface LogicalNetNodelinkId - link IDpublic boolean isPartiallyLoaded()
isPartiallyLoaded in interface LogicalNetNodepublic LogicalNode toStandAloneNode()
LogicalNetNodetoStandAloneNode in interface LogicalNetNode
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface LogicalNetNodejava.lang.CloneNotSupportedExceptionpublic boolean isDummyExternalNode()
LogicalNetNodeisDummyExternalNode in interface LogicalNetNodepublic CategorizedUserData getCategorizedUserData()
public void setCategorizedUserData(CategorizedUserData userData)
userData -public UserData getUserData(int category)
public void setUserData(int category,
UserData userData)
userData -public long getId()
LogicalNodegetId in interface LogicalNodepublic double getCost()
LogicalNodegetCost in interface LogicalNodepublic void setCost(double cost)
LogicalNodesetCost in interface LogicalNodecost - node costpublic int getMaxLinkLevel()
LogicalNodegetMaxLinkLevel in interface LogicalNodepublic void setMaxLinkLevel(int maxLinkLevel)
LogicalNodesetMaxLinkLevel in interface LogicalNodemaxLinkLevel - maximum link level of the links incident to this nodepublic boolean isActive()
LogicalNodeisActive in interface LogicalNodepublic void setIsActive(boolean isActive)
LogicalNodesetIsActive in interface LogicalNodeisActive - true if the node is active; false otherwise.public void update(LogicalNode node)
LogicalNodeupdate in interface LogicalNodenode - node containing the attributes to copy frompublic CategorizedUserData getCategorizedUserData()
public void setCategorizedUserData(CategorizedUserData cud)
public UserData getUserData(int category)
public void setUserData(int category,
UserData userData)