MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getOr

Method getOr

src/main/java/field/utility/Dict.java:458–462  ·  view source on GitHub ↗
(Prop<T> key, Supplier<T> def)

Source from the content-addressed store, hash-verified

456 }
457
458 public <T> T getOr(Prop<T> key, Supplier<T> def) {
459 T t = get(key);
460 if (t == null) return def.get();
461 return t;
462 }
463
464 public <T> T computeIfAbsent(Prop<T> k, Function<Prop<T>, T> def) {
465

Callers 15

drawMethod · 0.95
asMap_getMethod · 0.80
expiresMethod · 0.80
drawMethod · 0.80
dispatchLineMethod · 0.80
defaultdrawsLinesMethod · 0.80
onMouseDownMethod · 0.80
onMouseMoveMethod · 0.80
dirtyMethod · 0.80
KeyboardFocusMethod · 0.80
onMethod · 0.80
getSelectorMethod · 0.80

Calls 2

getMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected