Пример #1
0
 public ImmutableBag<T> newWithAll(Iterable<? extends T> elements) {
   return Iterate.addAllTo(elements, HashBag.newBag(this.delegate)).toImmutable();
 }
Пример #2
0
 public ImmutableBag<T> newWith(T element) {
   return HashBag.newBag(this.delegate).with(element).toImmutable();
 }
Пример #3
0
 public ImmutableBag<T> newWithout(T element) {
   HashBag<T> hashBag = HashBag.newBag(this.delegate);
   hashBag.remove(element);
   return hashBag.toImmutable();
 }
Пример #4
0
 public ImmutableHashBag(Bag<? extends T> source) {
   this.delegate = HashBag.newBag(source);
 }