com.sun.electric.database.id
Class TechId

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

public final class TechId
extends java.lang.Object
implements java.io.Serializable

The TechId immutable class identifies technology independently of threads. It differs from Technology objects, which will be owned by threads in transactional database. This class is thread-safe except inCurrentThread method.

See Also:
Serialized Form

Field Summary
 IdManager idManager
          IdManager which owns this TechId.
static TechId[] NULL_ARRAY
          Empty TechId array for initialization.
 int techIndex
          Unique index of this TechId.
 java.lang.String techName
          Technology name
 
Method Summary
 Technology inDatabase(EDatabase database)
          Method to return the Technology representing TechId in the specified EDatabase.
static boolean jelibSafeName(java.lang.String str)
          Method checks that string is safe to write into JELIB file without conversion.
 ArcProtoId newArcProtoId(java.lang.String arcProtoName)
          Returns ArcProtoId with specified arcProtoName.
 PrimitiveNodeId newPrimitiveNodeId(java.lang.String primitiveNodeName)
          Returns PrimitiveNodeId with specified primitiveNodeName.
 java.lang.String toString()
          Returns a printable version of this TechId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ARRAY

public static final TechId[] NULL_ARRAY
Empty TechId array for initialization.


idManager

public final IdManager idManager
IdManager which owns this TechId.


techName

public final java.lang.String techName
Technology name


techIndex

public final int techIndex
Unique index of this TechId.

Method Detail

newArcProtoId

public ArcProtoId newArcProtoId(java.lang.String arcProtoName)
Returns ArcProtoId with specified arcProtoName.

Parameters:
arcProtoName - arc proto name.
Returns:
ArcProtoId with specified arcProtoName.

newPrimitiveNodeId

public PrimitiveNodeId newPrimitiveNodeId(java.lang.String primitiveNodeName)
Returns PrimitiveNodeId with specified primitiveNodeName.

Parameters:
primitiveNodeName - primitive node name.
Returns:
PrimitiveNodeId with specified primitiveNodeName.

inDatabase

public Technology inDatabase(EDatabase database)
Method to return the Technology representing TechId in the specified EDatabase.

Parameters:
database - EDatabase where to get from.
Returns:
the Technology representing TechId in the specified database. This method is not properly synchronized.

toString

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

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

jelibSafeName

public static boolean jelibSafeName(java.lang.String str)
Method checks that string is safe to write into JELIB file without conversion.

Parameters:
str - the string to check.
Returns:
true if string is safe to write into JELIB file.