com.sun.electric.database.id
Class PrimitiveNodeId

java.lang.Object
  extended by com.sun.electric.database.id.PrimitiveNodeId
All Implemented Interfaces:
NodeProtoId, java.io.Serializable

public class PrimitiveNodeId
extends java.lang.Object
implements NodeProtoId, java.io.Serializable

The PrimitiveNodeId immutable class identifies primitive node proto independently of threads. It differs from PrimitiveNode objects, which will be owned by threads in transactional database. This class is thread-safe except inCurrentThread method.

See Also:
Serialized Form

Field Summary
 int chronIndex
          Unique index of this PrimtiveNodeId in TechId.
 java.lang.String fullName
          PrimitiveNode full name
 java.lang.String name
          PrimitiveNode name
 TechId techId
          TechId of this PrimitiveNodeId.
 
Method Summary
 PrimitivePortId getPortId(int chronIndex)
          Returns PrimitivePortId in this PrimitiveNodeId with specified chronological index.
 PrimitiveNode inDatabase(EDatabase database)
          Method to return the NodeProto representing NodeProtoId in the specified EDatabase.
 PrimitivePortId newPortId(java.lang.String externalId)
          Returns PrimtiivePortId in this node proto with specified external id.
 java.lang.String toString()
          Returns a printable version of this ArcProtoId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

techId

public final TechId techId
TechId of this PrimitiveNodeId.


name

public final java.lang.String name
PrimitiveNode name


fullName

public final java.lang.String fullName
PrimitiveNode full name


chronIndex

public final int chronIndex
Unique index of this PrimtiveNodeId in TechId.

Method Detail

getPortId

public PrimitivePortId getPortId(int chronIndex)
Returns PrimitivePortId in this PrimitiveNodeId with specified chronological index.

Specified by:
getPortId in interface NodeProtoId
Parameters:
chronIndex - chronological index of PrimitivePortId.
Returns:
PrimitivePortId with specified chronological index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if no such PrimitivePortId.

newPortId

public PrimitivePortId newPortId(java.lang.String externalId)
Returns PrimtiivePortId in this node proto with specified external id. If this external id was requested earlier, the previously created PrimitivePortId returned, otherwise the new PrimitivePortId is created.

Specified by:
newPortId in interface NodeProtoId
Parameters:
externalId - external id of PrimitivePortId.
Returns:
PrimitivePortId with specified external id.
Throws:
java.lang.NullPointerException - if externalId is null.

inDatabase

public PrimitiveNode inDatabase(EDatabase database)
Method to return the NodeProto representing NodeProtoId in the specified EDatabase.

Specified by:
inDatabase in interface NodeProtoId
Parameters:
database - EDatabase where to get from.
Returns:
the NodeProto representing NodeProtoId in the specified database. This method is not properly synchronized.

toString

public java.lang.String toString()
Returns a printable version of this ArcProtoId.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this ArcProtoId.