Examples of MutableByteBag


Examples of com.gs.collections.api.bag.primitive.MutableByteBag

        return set;
    }

    public MutableByteBag toBag()
    {
        final MutableByteBag bag = new ByteHashBag();
        this.forEach(new ByteProcedure()
        {
            public void value(byte each)
            {
                bag.add(each);
            }
        });
        return bag;
    }
View Full Code Here

Examples of com.gs.collections.api.bag.primitive.MutableByteBag

    @Override
    public <R extends MutableByteCollection> R collectByte(final ByteFunction<? super T> byteFunction, final R target)
    {
        if (target instanceof MutableByteBag)
        {
            final MutableByteBag targetBag = (MutableByteBag) target;
            this.forEachWithOccurrences(new ObjectIntProcedure<T>()
            {
                public void value(T each, int occurrences)
                {
                    targetBag.addOccurrences(byteFunction.byteValueOf(each), occurrences);
                }
            });
        }
        else
        {
View Full Code Here

Examples of com.gs.collections.api.bag.primitive.MutableByteBag

        }

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

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

            this.bag = deserializedBag;
        }
View Full Code Here

Examples of com.gs.collections.api.bag.primitive.MutableByteBag

        return result;
    }

    public MutableByteBag toBag()
    {
        MutableByteBag result = new ByteHashBag(this.size());

        for (int i = 0; i < this.keys.length; i++)
        {
            if (isNonSentinel(this.keys[i]))
            {
                result.add(this.values[i]);
            }
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.