Class BankSeen
JVM-wide: every plugin loads its own copy of shared-lib, so the
snapshot lives in javax.swing.UIManager under KEY as JDK types only
(Object[]{Long at, Object[][] rows}, each row {String name, Integer qty, Integer slot}), immutable
once published. Every copy captures into and reads the same one.
Only a read taken while the bank was really drawn may be captured; the bank facade's scan, which captures it, checks that. An empty or null capture is never stored: it is what a closed bank reads as, and it must not replace a good snapshot. A genuinely emptied bank therefore keeps its last non-empty snapshot until the player sees it again with items in it (the scan cannot tell an empty bank from a closed one either). Rows with a blank name are dropped, and a capture where more than half the rows are blank is skipped whole.
Belongs to one account: SessionAccount clears it when a different account is seen logged in.
Never throws into a caller.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidStores a snapshot.static voidclear()Forgets the snapshot: another account logged in (SessionAccount).last()nullbefore any capture, else{at, items:[{name, qty, slot}]}.static voidTest hook: forgets the snapshot.
-
Method Details
-
capture
-
last
-
clear
public static void clear()Forgets the snapshot: another account logged in (SessionAccount). -
resetForTest
public static void resetForTest()Test hook: forgets the snapshot.
-