MCPcopy Create free account
hub / github.com/badvision/jace / insertCard

Method insertCard

src/main/java/jace/apple2e/Apple2e.java:173–184  ·  view source on GitHub ↗
(DeviceSelection<Cards> type, int slot)

Source from the content-addressed store, hash-verified

171 }
172
173 private void insertCard(DeviceSelection<Cards> type, int slot) {
174 if (getMemory().getCard(slot).isPresent()) {
175 if (type.getValue() != null && type.getValue().isInstance(getMemory().getCard(slot).get())) {
176 return;
177 }
178 getMemory().removeCard(slot);
179 }
180 if (type != null && type.getValue() != null) {
181 Card card = type.getValue().create();
182 getMemory().addCard(card, slot);
183 }
184 }
185
186 private RAM128k.RamCards getDesiredMemoryConfiguration() {
187 if (ramCard.getValue() == null) {

Callers 1

reconfigureMethod · 0.95

Calls 8

getCardMethod · 0.80
removeCardMethod · 0.80
addCardMethod · 0.80
getValueMethod · 0.65
isInstanceMethod · 0.65
createMethod · 0.65
getMemoryMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected