Class BasePin

java.lang.Object
io.zucchini.circuitsimtester.api.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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.ra4king.circuitsim.simulator.components.wiring.Pin
    The Pin wrapped by this instance.
    protected Subcircuit
    The Subcircuit 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 provided Pin component and which lives in the provided Subcircuit.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.ra4king.circuitsim.simulator.components.wiring.Pin
    Returns the internal CircuitSim Pin component this object wraps.
    Returns the Subcircuit, a wrapper around a CircuitSim CircuitBoard where this Pin lives.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pin

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

      protected Subcircuit subcircuit
      The Subcircuit where this pin lives
  • Constructor Details

    • 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 Details

    • 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:
    • getSubcircuit

      public Subcircuit getSubcircuit()
      Returns the Subcircuit, a wrapper around a CircuitSim CircuitBoard where this Pin lives.
      Returns:
      the Subcircuit where this pin lives