public class ImmutablePortInst extends ImmutableElectricObject
Modifier and Type | Field and Description |
---|---|
static ImmutablePortInst |
EMPTY |
static ImmutablePortInst[] |
NULL_ARRAY |
flags
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks invariant of this ImmutablePortInst.
|
boolean |
equalsExceptVariables(ImmutableElectricObject o)
Indicates whether fields of other ImmutableElectricObject are equal to fileds of this object.
|
int |
hashCodeExceptVariables()
Return a hash code value for fields of this object.
|
ImmutablePortInst |
withoutVariable(Variable.Key key)
Returns ImmutablePortInst which differs from this ImmutablePortInst by removing Variable
with the specified key.
|
ImmutablePortInst |
withRenamedIds(IdMapper idMapper)
Returns ImmutablePortInst which differs from this ImmutablePortInst by renamed Ids.
|
ImmutablePortInst |
withVariable(Variable var)
Returns ImmutablePortInst which differs from this ImmutablePortInst by additional Variable.
|
getNumVariables, getVar, getVar, getVariables, getVarValue, searchVar, toVariableArray
public static final ImmutablePortInst[] NULL_ARRAY
public static final ImmutablePortInst EMPTY
public ImmutablePortInst withVariable(Variable var)
var
- additional Variable.java.lang.NullPointerException
- if var is nullpublic ImmutablePortInst withoutVariable(Variable.Key key)
key
- Variable Key to remove.java.lang.NullPointerException
- if key is nullpublic ImmutablePortInst withRenamedIds(IdMapper idMapper)
idMapper
- a map from old Ids to new Ids.public int hashCodeExceptVariables()
hashCodeExceptVariables
in class ImmutableElectricObject
public boolean equalsExceptVariables(ImmutableElectricObject o)
equalsExceptVariables
in class ImmutableElectricObject
o
- other ImmutableElectricObject.public void check()
java.lang.AssertionError
- if invariant is broken.