code: public ShareableResource setCapacity(int val, Node... nodes) {
      Stream.of(nodes).forEach(n -> this.setCapacity(n, val));
      return this;
    }
docs: Set the resource consumption of nodes.
  
  @param val   the value to set
  @param nodes the nodes
  @return the current resource