Uses of Interface
api.IComponent
-
Packages that use IComponent Package Description api hw4 -
-
Uses of IComponent in api
Subinterfaces of IComponent in api Modifier and Type Interface Description interface
IStatefulComponent
Subinterface of IComponent that adds methods for dealing with components that have internal state.Classes in api that implement IComponent Modifier and Type Class Description class
ExternalValue
An ExternalValue is a component representing a value that might be set by setting switches or reading external data.Methods in api that return IComponent Modifier and Type Method Description IComponent
Pin. getParent()
Returns a reference to the component to which this Pin belongsMethods in api with parameters of type IComponent Modifier and Type Method Description static void
Util. addListener(IComponent c, IPinListener listener)
Adds the given listener to all outputs of the given component.static void
Util. connect(IComponent src, int startSrc, IComponent dst, int startDst, int howMany)
Connects outputs of the source component, starting with the given index 'startSrc', to inputs of the destination component starting with the given index 'startDst'.static void
Util. connect(IComponent src, IComponent dst)
Connects all outputs of the source component to all inputs of the destination component (or as many as possible without going out of bounds).static void
Util. setInputs(IComponent c, int value)
Sets the inputs of the given component using the binary representation of the given value.static void
Util. setInputs(IComponent c, java.lang.String values)
Sets the inputs of the given component from the given string of '0' and '1' characters, where the string is read right to left.static void
Util. setInputs(IComponent c, java.lang.String values, int start)
Sets the inputs of the given component from the given string of '0' and '1' characters, where the string is read right to left.void
IPinListener. update(IComponent c)
Invoked by a Pin when its value changes.void
Probe. update(IComponent c)
Constructors in api with parameters of type IComponent Constructor Description Pin(IComponent parent)
Constructs a Pin with the given parent component. -
Uses of IComponent in hw4
Classes in hw4 that implement IComponent Modifier and Type Class Description class
AbstractComponent
Abstract supertype with common code for all components.class
AbstractStatefulComponent
Abstract supertype for stateful components.class
AndGate
Implementation of an and-gate with two inputs.class
CompoundComponent
Implementation of IComponent that contains other components.class
Counter
Implementation of a binary counter with a fixed number of bits.class
FullAdder
Implementation of a standard full adder circuit.class
HalfAdder
Implementation of a standard half adder circuit.class
MultiComponent
Implementation of a specialized CompoundComponent in which all subcomponents are identical and have one output.class
Multiplexer
Implementation of a single-output multiplexer.class
NotGate
Implementation of a not-gate with one input.class
OrGate
Implementation of an or-gate with two inputs.class
Register
Implementation of a register with an internal "state" consisting of a fixed number of bits.Methods in hw4 that return types with arguments of type IComponent Modifier and Type Method Description java.util.ArrayList<IComponent>
CompoundComponent. getComponents()
Returns a reference to the list of subcomponents.Methods in hw4 with parameters of type IComponent Modifier and Type Method Description void
CompoundComponent. addComponent(IComponent c)
Adds the given component to the list of subcomponents.Constructors in hw4 with parameters of type IComponent Constructor Description MultiComponent(IComponent[] components)
Constructs a MultiComponent with the given array of subcomponents.
-