@Test public void pollLastTest() throws Exception { Step step = stepStorage.getLast(); assertTrue(step == stepStorage.pollLast()); assertThat(stepStorage.get(), hasSize(1)); }
public Step pollLast() { Deque<Step> queue = get(); Step last = queue.pollLast(); if (queue.isEmpty()) { queue.add(createRootStep()); } return last; }
StepStorage extends InheritableThreadLocal<Deque<Step>> { public Step pollLast() { Deque<Step> queue = get(); Step last = queue.pollLast(); if (queue.isEmpty()) { queue.add(createRootStep()); } return last; } }
StepStorage extends InheritableThreadLocal<Deque<Step>> { public Step pollLast() { Deque<Step> queue = get(); Step last = queue.pollLast(); if (queue.isEmpty()) { queue.add(createRootStep()); } return last; }  }
StepStorage extends InheritableThreadLocal<Deque<Step>> { public Step pollLast() { Deque<Step> queue = get(); Step last = queue.pollLast(); if (queue.isEmpty()) { queue.add(createRootStep()); } return last; }  Step getLast(); void put(Step step); Step pollLast(); Step adopt(); Step createRootStep(); }
StepStorage extends InheritableThreadLocal<Deque<Step>> { public Step pollLast() { Deque<Step> queue = get(); Step last = queue.pollLast(); if (queue.isEmpty()) { queue.add(createRootStep()); } return last; }  Step getLast(); void put(Step step); Step pollLast(); Step adopt(); Step createRootStep(); static final Object LOCK; }