Set<FooBar> getDecomposeList(int value, Piece piece, Map<Integer, Set<FooBar>> decompositionMap) { // logger.debug(String.format("value[%s] piece[%s]", value, piece)); if (value < piece.getValue()) return Collections.EMPTY_SET; Set<FooBar> result = new HashSet<FooBar>(); if (value == piece.getValue()) { FooBar fooBar = new FooBar(); fooBar.add(piece); result.add(fooBar); } for (FooBar fooBar : decompositionMap.get(value - piece.getValue())) { result.add(fooBar.copy().add(piece)); } return result; }
@Override public String foobar() { return delegate.foobar(); }
@Override public String bar() { return delegate.bar(); }