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