LinkedList stack = (LinkedList) attributes.get(key);
currentTopAttributes.remove(key);
if (stack == null || stack.size() == 0) {
throw new EmptyStackException();
}
Object result = stack.removeFirst();
if (stack.size() > 0)
currentTopAttributes.put(key, stack.getFirst());