Class BasePin

  • Direct Known Subclasses:
    InputPin, OutputPin

    public abstract class BasePin
    extends Object
    Wraps a CircuitSim Pin component. You shouldn't need to use this directly; InputPin and OutputPin extend this class and provide methods for getting or setting the value of the pin.
    See Also:
    InputPin, OutputPin
    • Field Detail

      • pin

        protected com.ra4king.circuitsim.simulator.components.wiring.Pin pin
        The Pin wrapped by this instance.
    • Constructor Detail

      • BasePin

        public BasePin​(com.ra4king.circuitsim.simulator.components.wiring.Pin pin,
                       Subcircuit subcircuit)
        Creates a new BasePin which wraps the provided Pin component and which lives in the provided Subcircuit.
        Parameters:
        pin - Pin component to wrap
        subcircuit - where this pin lives
    • Method Detail

      • getPin

        public com.ra4king.circuitsim.simulator.components.wiring.Pin getPin()
        Returns the internal CircuitSim Pin 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 the Subcircuit, a wrapper around a CircuitSim CircuitBoard where this Pin lives.
        Returns:
        the Subcircuit where this pin lives