public abstract class ImmutableElectricObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
flags
flags of this IimmutableElectricObject.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equalsExceptVariables(ImmutableElectricObject o)
Indicates whether fields of other ImmutableElectricObject are equal to fileds of this object.
|
int |
getNumVariables()
Method to return the number of Variables on this ImmutableElectricObject.
|
Variable |
getVar(int varIndex)
Method to return the Variable by its varIndex.
|
Variable |
getVar(Variable.Key key)
Method to return the Variable on this ImmuatbleElectricObject with a given key.
|
java.util.Iterator<Variable> |
getVariables()
Method to return an Iterator over all Variables on this ImmutableElectricObject.
|
<T> T |
getVarValue(Variable.Key key,
java.lang.Class type)
Method to return the value of the Variable on this ImmutableElectricObject with a given key and type.
|
abstract int |
hashCodeExceptVariables()
Return a hash code value for fields of this object.
|
int |
searchVar(Variable.Key key)
Searches the variables for the specified variable key using the binary
search algorithm.
|
Variable[] |
toVariableArray()
Method to return an array of all Variables on this ImmutableElectricObject.
|
public Variable getVar(Variable.Key key)
key
- the key of the Variable.java.lang.NullPointerException
- if key is nullpublic <T> T getVarValue(Variable.Key key, java.lang.Class type)
key
- the key of the Variable.type
- the required type of the Variable.java.lang.NullPointerException
- if key or type is nullpublic java.util.Iterator<Variable> getVariables()
public Variable[] toVariableArray()
public int getNumVariables()
public Variable getVar(int varIndex)
varIndex
- index of Variable.ArrayIndexOutOfBoundesException
- if varIndex out of bounds.public int searchVar(Variable.Key key)
key
- the variable key to be searched.java.lang.NullPointerException
- if key is nullpublic abstract int hashCodeExceptVariables()
public abstract boolean equalsExceptVariables(ImmutableElectricObject o)
o
- other ImmutableElectricObject.