MCPcopy Create free account
hub / github.com/PCGen/pcgen / getDeque

Method getDeque

PCGen-base/code/src/java/pcgen/base/util/MappedDeque.java:149–152  ·  view source on GitHub ↗

Returns a Deque for the given TypedKey, building and storing it if the Deque does not currently exist.

(TypedKey<T> key)

Source from the content-addressed store, hash-verified

147 * Deque does not currently exist.
148 */
149 private <T> Deque<Object> getDeque(TypedKey<T> key)
150 {
151 return map.computeIfAbsent(key, k -> new ArrayDeque<>());
152 }
153
154 /**
155 * Unwraps the null object, since Deque does not support null values

Callers 4

pushMethod · 0.95
popMethod · 0.95
peekMethod · 0.95
setMethod · 0.95

Calls 1

computeIfAbsentMethod · 0.45

Tested by

no test coverage detected