Package com.gs.collections.impl.bag.mutable.primitive

Examples of com.gs.collections.impl.bag.mutable.primitive.CharHashBag$InternalIterator


        return new CharHashSet();
    }

    public MutableCharBag toBag()
    {
        return new CharHashBag();
    }
View Full Code Here


        return CharHashBag.newBag(this.delegate).with(element).toImmutable();
    }

    public ImmutableCharBag newWithout(char element)
    {
        CharHashBag hashBag = CharHashBag.newBag(this.delegate);
        hashBag.remove(element);
        return hashBag.toImmutable();
    }
View Full Code Here

        return hashBag.toImmutable();
    }

    public ImmutableCharBag newWithAll(CharIterable elements)
    {
        CharHashBag bag = CharHashBag.newBag(this.delegate);
        bag.addAll(elements);
        return bag.toImmutable();
    }
View Full Code Here

        return bag.toImmutable();
    }

    public ImmutableCharBag newWithoutAll(CharIterable elements)
    {
        CharHashBag bag = CharHashBag.newBag(this.delegate);
        bag.removeAll(elements);
        return bag.toImmutable();
    }
View Full Code Here

        }

        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
        {
            int size = in.readInt();
            MutableCharBag deserializedBag = new CharHashBag();

            for (int i = 0; i < size; i++)
            {
                deserializedBag.addOccurrences(in.readChar(), in.readInt());
            }

            this.bag = deserializedBag;
        }
View Full Code Here

        return set;
    }

    public MutableCharBag toBag()
    {
        final MutableCharBag bag = new CharHashBag();
        this.forEach(new CharProcedure()
        {
            public void value(char each)
            {
                bag.add(each);
            }
        });
        return bag;
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableCharBag collectChar(final CharFunction<? super T> charFunction)
    {
        final CharHashBag result = new CharHashBag(this.size());
        this.forEachWithOccurrences(new ObjectIntProcedure<T>()
        {
            public void value(T each, int occurrences)
            {
                result.addOccurrences(charFunction.charValueOf(each), occurrences);
            }
        });
        return result.toImmutable();
    }
View Full Code Here

    }

    public ImmutableCharBag select(CharPredicate predicate)
    {
        return predicate.accept(this.element1) ? CharHashBag.newBagWith(this.element1).toImmutable()
                : new CharHashBag().toImmutable();
    }
View Full Code Here

                : new CharHashBag().toImmutable();
    }

    public ImmutableCharBag reject(CharPredicate predicate)
    {
        return predicate.accept(this.element1) ? new CharHashBag().toImmutable()
                : CharHashBag.newBagWith(this.element1).toImmutable();
    }
View Full Code Here

        return this.collectByte(byteFunction, new ByteHashBag());
    }

    public MutableCharBag collectChar(CharFunction<? super T> charFunction)
    {
        return this.collectChar(charFunction, new CharHashBag());
    }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.bag.mutable.primitive.CharHashBag$InternalIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.