com.sun.electric.database
Class ImmutableIconInst

java.lang.Object
  extended by com.sun.electric.database.ImmutableElectricObject
      extended by com.sun.electric.database.ImmutableNodeInst
          extended by com.sun.electric.database.ImmutableIconInst

public class ImmutableIconInst
extends ImmutableNodeInst


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.database.ImmutableNodeInst
ImmutableNodeInst.Flag
 
Field Summary
 
Fields inherited from class com.sun.electric.database.ImmutableNodeInst
anchor, EMPTY_LIST, HARD_SELECT, LOCKED, name, nameDescriptor, nodeId, NULL_ARRAY, orient, protoDescriptor, protoId, size, techBits, VIS_INSIDE
 
Fields inherited from class com.sun.electric.database.ImmutableElectricObject
flags
 
Method Summary
 void check()
          Checks invariant of this ImmutableIconInst.
 boolean equalsExceptVariables(ImmutableElectricObject o)
          Indicates whether fields of other ImmutableElectricObject are equal to fields of this object.
 Variable getDefinedParameter(Variable.AttrKey key)
          Method to return the Parameter on this ImmuatbleIconInst with a given key.
 java.util.Iterator<Variable> getDefinedParameters()
          Method to return an Iterator over all Parameters on this ImmutableIconInst.
 int getNumDefinedParameters()
          Method to return the number of Parameters on this ImmutableIconInst.
 ImmutableIconInst withoutParam(Variable.AttrKey key)
          Returns ImmutableIconInst which differs from this ImmutableIconInst by removing parameter with the specified key.
 ImmutableIconInst withParam(Variable var)
          Returns ImmutableIconInst which differs from this ImmutableIconInst by additional parameter.
 ImmutableNodeInst withVariable(Variable var)
          Returns ImmutableIconInst which differs from this ImmutableIconInst by additional Variable.
 
Methods inherited from class com.sun.electric.database.ImmutableNodeInst
computeBounds, flagsFromElib, getElibBits, getPortInst, getPortsWithVariables, getSerpentineTransistorLength, getTrace, hashCodeExceptVariables, hasPortInstVariables, is, isCellCenter, isUsernamed, newInstance, techSpecificFromElib, withAnchor, withFlag, withName, withNameDescriptor, withOrient, withoutVariable, withPortInst, withProtoDescriptor, withSize, withStateBits, withTechSpecific
 
Methods inherited from class com.sun.electric.database.ImmutableElectricObject
getNumVariables, getVar, getVar, getVariables, getVarValue, searchVar, toVariableArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefinedParameter

public Variable getDefinedParameter(Variable.AttrKey key)
Method to return the Parameter on this ImmuatbleIconInst with a given key.

Parameters:
key - the key of the Variable.
Returns:
the Parameter with that key, or null if there is no such Variable.
Throws:
java.lang.NullPointerException - if key is null

getDefinedParameters

public java.util.Iterator<Variable> getDefinedParameters()
Method to return an Iterator over all Parameters on this ImmutableIconInst.

Returns:
an Iterator over all Parameters on this ImmutableIconInst.

getNumDefinedParameters

public int getNumDefinedParameters()
Method to return the number of Parameters on this ImmutableIconInst.

Returns:
the number of Parametes on this ImmutableIconInst.

withParam

public ImmutableIconInst withParam(Variable var)
Returns ImmutableIconInst which differs from this ImmutableIconInst by additional parameter. If this ImmutableIconInst has parameter with the same key as new, the old variable will not be in new ImmutableIconInst.

Parameters:
var - additional Variable.
Returns:
ImmutableIconInst with additional Variable.
Throws:
java.lang.NullPointerException - if var is null

withoutParam

public ImmutableIconInst withoutParam(Variable.AttrKey key)
Returns ImmutableIconInst which differs from this ImmutableIconInst by removing parameter with the specified key. Returns this ImmutableIconInst if it doesn't contain parameter with the specified key.

Parameters:
key - Variable Key to remove.
Returns:
ImmutableIconInst without Variable with the specified key.
Throws:
java.lang.NullPointerException - if key is null

withVariable

public ImmutableNodeInst withVariable(Variable var)
Returns ImmutableIconInst which differs from this ImmutableIconInst by additional Variable. If this ImmutableNideInst has Variable with the same key as new, the old variable will not be in new ImmutableNodeInst.

Overrides:
withVariable in class ImmutableNodeInst
Parameters:
var - additional Variable.
Returns:
ImmutableNodeInst with additional Variable.
Throws:
java.lang.NullPointerException - if var is null
java.lang.IllegalArgumentException - if this ImmutableIconInst has a parameter with the same name as new variable

equalsExceptVariables

public boolean equalsExceptVariables(ImmutableElectricObject o)
Indicates whether fields of other ImmutableElectricObject are equal to fields of this object. Variables of objects are not compared.

Overrides:
equalsExceptVariables in class ImmutableNodeInst
Parameters:
o - other ImmutableElectricObject.
Returns:
true if fields of objects are equal.

check

public void check()
Checks invariant of this ImmutableIconInst.

Overrides:
check in class ImmutableNodeInst
Throws:
java.lang.AssertionError - if invariant is broken.