Beispiel #1
0
  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;
  }
Beispiel #2
0
 @Override
 public String foobar() {
   return delegate.foobar();
 }
Beispiel #3
0
 @Override
 public String bar() {
   return delegate.bar();
 }