public Deque getCopyOfDequeByKey()

in slf4j-to-log4j-api/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java [98:106]


    public Deque<String> getCopyOfDequeByKey(final String key) {
        if (key == null) {
            final ContextStack stack = ThreadContext.getImmutableStack();
            final Deque<String> copy = new ArrayDeque<>(stack.size());
            stack.forEach(copy::push);
            return copy;
        }
        return mapOfStacks.getCopyOfDequeByKey(key);
    }