Examples of ByteIntProcedure


Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    }

    public ByteHashBag(ByteHashBag bag)
    {
        this.items = new ByteIntHashMap(bag.sizeDistinct());
        bag.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte item, int occurrences)
            {
                ByteHashBag.this.addOccurrences(item, occurrences);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    }

    public static ByteHashBag newBag(ByteBag source)
    {
        final ByteHashBag result = new ByteHashBag();
        source.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte each, int occurrences)
            {
                result.addOccurrences(each, occurrences);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

            return false;
        }
        if (source instanceof ByteBag)
        {
            ByteBag otherBag = (ByteBag) source;
            otherBag.forEachWithOccurrences(new ByteIntProcedure()
            {
                public void value(byte each, int occurrences)
                {
                    ByteHashBag.this.addOccurrences(each, occurrences);
                }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

        }
        int oldSize = this.size();
        if (source instanceof ByteBag)
        {
            ByteBag otherBag = (ByteBag) source;
            otherBag.forEachWithOccurrences(new ByteIntProcedure()
            {
                public void value(byte each, int occurrences)
                {
                    int oldOccurrences = ByteHashBag.this.items.removeKeyIfAbsent(each, 0);
                    ByteHashBag.this.size -= oldOccurrences;
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

        return true;
    }

    public void forEach(final ByteProcedure procedure)
    {
        this.items.forEachKeyValue(new ByteIntProcedure()
        {
            public void value(byte key, int occurrences)
            {
                for (int i = 0; i < occurrences; i++)
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    }

    public ByteHashBag select(final BytePredicate predicate)
    {
        final ByteHashBag result = new ByteHashBag();
        this.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte each, int occurrences)
            {
                if (predicate.accept(each))
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    }

    public ByteHashBag reject(final BytePredicate predicate)
    {
        final ByteHashBag result = new ByteHashBag();
        this.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte each, int occurrences)
            {
                if (!predicate.accept(each))
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    @Override
    public int hashCode()
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte eachItem, int occurrences)
            {
                result.add((int) eachItem ^ occurrences);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    {
        final boolean[] firstItem = {true};
        try
        {
            appendable.append(start);
            this.items.forEachKeyValue(new ByteIntProcedure()
            {
                public void value(byte each, int occurrences)
                {
                    try
                    {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.ByteIntProcedure

    }

    public int count(final BytePredicate predicate)
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new ByteIntProcedure()
        {
            public void value(byte each, int occurrences)
            {
                if (predicate.accept(each))
                {
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.