@Test public void set() { RegisterSet registerSet = new RegisterSet(); Register r1 = new Register("R1"); registerSet.put(1, r1); registerSet.set(1, 10); assertEquals(10, r1.getValue()); registerSet.set(3, 10); }
@Override public void set(int address, int value) { Register register = registers.get(address); if (register != null) { register.setValue(value); } else { LogManager.LOGGER.info("DEBUG: trying to set unknown reg index : " + address); } }
RegisterSet implements Target, MongoSerializable { @Override public void set(int address, int value) { Register register = registers.get(address); if (register != null) { register.setValue(value); } else { LogManager.LOGGER.info("DEBUG: trying to set unknown reg index : " + address); } } }
RegisterSet implements Target, MongoSerializable { @Override public void set(int address, int value) { Register register = registers.get(address); if (register != null) { register.setValue(value); } else { LogManager.LOGGER.info("DEBUG: trying to set unknown reg index : " + address); } } RegisterSet(); }
RegisterSet implements Target, MongoSerializable { @Override public void set(int address, int value) { Register register = registers.get(address); if (register != null) { register.setValue(value); } else { LogManager.LOGGER.info("DEBUG: trying to set unknown reg index : " + address); } } RegisterSet(); Register getRegister(int index); Register getRegister(String name); @Override int get(int address); @Override void set(int address, int value); void put(int index, Register register); void clear(); @Override Document mongoSerialise(); static RegisterSet deserialize(Document obj); static RegisterSet deserialize(JSONObject json); @Override String toString(); }
RegisterSet implements Target, MongoSerializable { @Override public void set(int address, int value) { Register register = registers.get(address); if (register != null) { register.setValue(value); } else { LogManager.LOGGER.info("DEBUG: trying to set unknown reg index : " + address); } } RegisterSet(); Register getRegister(int index); Register getRegister(String name); @Override int get(int address); @Override void set(int address, int value); void put(int index, Register register); void clear(); @Override Document mongoSerialise(); static RegisterSet deserialize(Document obj); static RegisterSet deserialize(JSONObject json); @Override String toString();  }