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

Method get

src/main/java/field/utility/Dict.java:435–441  ·  view source on GitHub ↗
(Prop<T> key)

Source from the content-addressed store, hash-verified

433 Function<Prop, Object> failure = null;
434
435 @SuppressWarnings("unchecked")
436 public <T> T get(Prop<T> key) {
437 Object o = dictionary.get(key);
438 if (failure != null && o == null && !dictionary.containsKey(key))
439 return (T) failure.apply(key);
440 return (T) o;
441 }
442
443 public Dict setFailure(Function<Prop, Object> failure) {
444 this.failure = failure;

Callers 10

getOrConstructMethod · 0.95
getOrMethod · 0.95
computeIfAbsentMethod · 0.95
getFloatMethod · 0.95
putAllMethod · 0.95
getFromMapMethod · 0.95
removeFromCollectionMethod · 0.95
removeFromMapMethod · 0.95
asMap_getMethod · 0.95
drawMethod · 0.95

Calls 3

getMethod · 0.65
applyMethod · 0.65
containsKeyMethod · 0.45

Tested by

no test coverage detected