35
35
* This interface defines real or virtual instance of NodeProto in a Cell..
37
public interface Nodable
39
// ------------------------ public methods -------------------------------
42
* Method to return the prototype of this Nodable.
43
* @return the prototype of this Nodable.
45
public NodeProto getProto();
48
* Method to tell whether this Nodable is a cell instance.
49
* @return true if this Nodable is a cell instance, false if it is a primitive
51
public boolean isCellInstance();
54
* Method to return the Cell that contains this Nodable.
55
* @return the Cell that contains this Nodable.
57
public Cell getParent();
60
* Method to return the name of this Nodable.
61
* @return the name of this Nodable.
63
public String getName();
66
* Method to return the name key of this Nodable.
67
* @return the name key of this Nodable.
69
public Name getNameKey();
37
public interface Nodable {
38
// ------------------------ public methods -------------------------------
41
* Method to return the prototype of this Nodable.
42
* @return the prototype of this Nodable.
44
public NodeProto getProto();
47
* Method to tell whether this Nodable is a cell instance.
48
* @return true if this Nodable is a cell instance, false if it is a primitive
50
public boolean isCellInstance();
53
* Method to return the Cell that contains this Nodable.
54
* @return the Cell that contains this Nodable.
56
public Cell getParent();
59
* Method to return the name of this Nodable.
60
* @return the name of this Nodable.
62
public String getName();
65
* Method to return the name key of this Nodable.
66
* @return the name key of this Nodable.
68
public Name getNameKey();
72
71
* Method to return the Variable on this ElectricObject with a given key.
73
72
* @param key the key of the Variable.
74
73
* @return the Variable with that key, or null if there is no such Variable.
76
public Variable getVar(Variable.Key key);
75
public Variable getVar(Variable.Key key);
79
78
// * Method to return an iterator over all Variables on this Nodable.
80
79
// * @return an iterator over all Variables on this Nodable.
82
81
// public Iterator<Variable> getVariables();
85
83
* Method to return the Parameter on this Nodable with the given key.
86
84
* If the parameter is not found on this Nodable, it
92
90
public Variable getParameter(Variable.Key key);
95
* Method to return the Parameter or Variable on this Nodable with a given key.
96
* @param key the key of the Parameter or Variable.
97
* @return the Parameter or Variable with that key, or null if there is no such Parameter or Variable Variable.
93
* Method to return the Parameter or Variable on this Nodable with a given key.
94
* @param key the key of the Parameter or Variable.
95
* @return the Parameter or Variable with that key, or null if there is no such Parameter or Variable Variable.
98
96
* @throws NullPointerException if key is null
100
public Variable getParameterOrVariable(Variable.Key key);
98
public Variable getParameterOrVariable(Variable.Key key);
103
101
* Method to tell if the Variable.Key is a defined parameters of this Nodable.
122
120
public Iterator<Variable> getDefinedParameters();
125
* Returns a printable version of this Nodable.
126
* @return a printable version of this Nodable.
128
public String toString();
123
* Returns a printable version of this Nodable.
124
* @return a printable version of this Nodable.
126
public String toString();
130
128
// JKG: trying this out