Package hw4
Class MultiComponent
- java.lang.Object
-
- hw4.AbstractComponent
-
- hw4.CompoundComponent
-
- hw4.MultiComponent
-
- All Implemented Interfaces:
IComponent
public class MultiComponent extends CompoundComponent
Implementation of a specialized CompoundComponent in which all subcomponents are identical and have one output. For each i less than n, inputs i * m up to (i + 1) * m are connected to the i-th subcomponent and the output of that subcomponent is connected to output i.- Author:
- smkautz
-
-
Constructor Summary
Constructors Constructor Description MultiComponent(IComponent[] components)
Constructs a MultiComponent with the given array of subcomponents.
-
Method Summary
-
Methods inherited from class hw4.CompoundComponent
addComponent, getComponents, propagate
-
Methods inherited from class hw4.AbstractComponent
inputs, inputsValid, invalidateInputs, invalidateOutputs, outputs, outputsValid
-
-
-
-
Constructor Detail
-
MultiComponent
public MultiComponent(IComponent[] components)
Constructs a MultiComponent with the given array of subcomponents. All elements of the array must be identical and must have one output.- Parameters:
components
- subcomponents for this multicomponent
-
-