@Test public void shouldFallBackToDefaultValueIfNoneOtherFound() { LevelIndex<Integer> levelIndex = levelIndex().withLevelCount(1).build(); levelIndex.add(new String[]{"*"}, 42); levelIndex.add(new String[]{"A"}, 11); FastLevelIndexWalker<Integer> walker = new FastLevelIndexWalker<Integer>(levelIndex, "B"); List<Integer> node = walker.find(); assertThat(node).containsExactly(42); }
@Override public List<T> find() { LevelNode<T> node = find(index.getRoot(), 0); return node != null ? node.getLeafList() : null; }
FastLevelIndexWalker implements LevelIndexWalker<T> { @Override public List<T> find() { LevelNode<T> node = find(index.getRoot(), 0); return node != null ? node.getLeafList() : null; } }
FastLevelIndexWalker implements LevelIndexWalker<T> { @Override public List<T> find() { LevelNode<T> node = find(index.getRoot(), 0); return node != null ? node.getLeafList() : null; } FastLevelIndexWalker(LevelIndex<T> index, String... levelValues); }
FastLevelIndexWalker implements LevelIndexWalker<T> { @Override public List<T> find() { LevelNode<T> node = find(index.getRoot(), 0); return node != null ? node.getLeafList() : null; } FastLevelIndexWalker(LevelIndex<T> index, String... levelValues); @Override List<T> find(); }
FastLevelIndexWalker implements LevelIndexWalker<T> { @Override public List<T> find() { LevelNode<T> node = find(index.getRoot(), 0); return node != null ? node.getLeafList() : null; } FastLevelIndexWalker(LevelIndex<T> index, String... levelValues); @Override List<T> find();  }