Package edu.gatech.cs2110.circuitsim.api
Class BasePin
- java.lang.Object
-
- edu.gatech.cs2110.circuitsim.api.BasePin
-
public abstract class BasePin extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected com.ra4king.circuitsim.simulator.components.wiring.Pin
pin
ThePin
wrapped by this instance.protected Subcircuit
subcircuit
TheSubcircuit
where this pin lives
-
Constructor Summary
Constructors Constructor Description BasePin(com.ra4king.circuitsim.simulator.components.wiring.Pin pin, Subcircuit subcircuit)
Creates a new BasePin which wraps the providedPin
component and which lives in the providedSubcircuit
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ra4king.circuitsim.simulator.components.wiring.Pin
getPin()
Returns the internal CircuitSimPin
component this object wraps.Subcircuit
getSubcircuit()
Returns theSubcircuit
, a wrapper around a CircuitSimCircuitBoard
where this Pin lives.
-
-
-
Field Detail
-
pin
protected com.ra4king.circuitsim.simulator.components.wiring.Pin pin
ThePin
wrapped by this instance.
-
subcircuit
protected Subcircuit subcircuit
TheSubcircuit
where this pin lives
-
-
Constructor Detail
-
BasePin
public BasePin(com.ra4king.circuitsim.simulator.components.wiring.Pin pin, Subcircuit subcircuit)
Creates a new BasePin which wraps the providedPin
component and which lives in the providedSubcircuit
.- Parameters:
pin
-Pin
component to wrapsubcircuit
- where this pin lives
-
-
Method Detail
-
getPin
public com.ra4king.circuitsim.simulator.components.wiring.Pin getPin()
Returns the internal CircuitSimPin
component this object wraps.This exposes an internal CircuitSim API. Do not use unless you know what you are doing.
- Returns:
- the CircuitSim
Pin
component wrapped by this object. - See Also:
InputPin.set(int)
,OutputPin.get()
-
getSubcircuit
public Subcircuit getSubcircuit()
Returns theSubcircuit
, a wrapper around a CircuitSimCircuitBoard
where this Pin lives.- Returns:
- the
Subcircuit
where this pin lives
-
-