1 package era.mi.logic.components;
3 import java.util.ArrayList;
4 import java.util.Arrays;
5 import java.util.Collections;
8 import era.mi.logic.Bit;
9 import era.mi.logic.wires.WireArray;
11 public class BitDisplay extends BasicComponent
13 private final WireArray in;
14 private Bit[] displayedValue;
16 public BitDisplay(WireArray in)
25 protected void compute()
27 displayedValue = in.getValues();
30 public Bit[] getDisplayedValue()
32 return displayedValue;
35 public boolean isDisplaying(Bit... values)
37 return Arrays.equals(displayedValue, values);
41 public List<WireArray> getAllInputs()
43 return Collections.unmodifiableList(Arrays.asList(in));
47 public List<WireArray> getAllOutputs()
49 return Collections.unmodifiableList(new ArrayList<WireArray>());