Examples of DoubleIntProcedure


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

    }

    public static DoubleHashBag newBag(DoubleBag source)
    {
        final DoubleHashBag result = new DoubleHashBag();
        source.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double each, int occurrences)
            {
                result.addOccurrences(each, occurrences);
            }
View Full Code Here

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

            return false;
        }
        if (source instanceof DoubleBag)
        {
            DoubleBag otherBag = (DoubleBag) source;
            otherBag.forEachWithOccurrences(new DoubleIntProcedure()
            {
                public void value(double each, int occurrences)
                {
                    DoubleHashBag.this.addOccurrences(each, occurrences);
                }
View Full Code Here

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

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

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

        return true;
    }

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

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

    }

    public DoubleHashBag select(final DoublePredicate predicate)
    {
        final DoubleHashBag result = new DoubleHashBag();
        this.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double each, int occurrences)
            {
                if (predicate.accept(each))
                {
View Full Code Here

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

    }

    public DoubleHashBag reject(final DoublePredicate predicate)
    {
        final DoubleHashBag result = new DoubleHashBag();
        this.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double each, int occurrences)
            {
                if (!predicate.accept(each))
                {
View Full Code Here

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

    @Override
    public int hashCode()
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double eachItem, int occurrences)
            {
                result.add((int) (Double.doubleToLongBits(eachItem) ^ Double.doubleToLongBits(eachItem) >>> 32) ^ occurrences);
            }
View Full Code Here

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

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

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

    }

    public int count(final DoublePredicate predicate)
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double each, int occurrences)
            {
                if (predicate.accept(each))
                {
View Full Code Here

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

    }

    public <V> MutableBag<V> collect(final DoubleToObjectFunction<? extends V> function)
    {
        final HashBag<V> result = HashBag.newBag(this.items.size());
        this.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double each, int occurrences)
            {
                result.addOccurrences(function.valueOf(each), occurrences);
            }
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.