Package com.gs.collections.api.iterator

Examples of com.gs.collections.api.iterator.DoubleIterator


    public ImmutableDoubleDoubleMap newWithoutAllKeys(DoubleIterable keys)
    {
        MutableDoubleDoubleMap map = new DoubleDoubleHashMap(this.size());
        map.putAll(this);
        DoubleIterator iterator = keys.doubleIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here


        }

        public boolean removeAll(DoubleIterable source)
        {
            int oldSize = DoubleLongHashMap.this.size();
            DoubleIterator iterator = source.doubleIterator();
            while (iterator.hasNext())
            {
                DoubleLongHashMap.this.removeKey(iterator.next());
            }
            return oldSize != DoubleLongHashMap.this.size();
        }
View Full Code Here

            return true;
        }

        public boolean containsAll(DoubleIterable source)
        {
            DoubleIterator iterator = source.doubleIterator();
            while (iterator.hasNext())
            {
                if (!DoubleLongHashMap.this.containsKey(iterator.next()))
                {
                    return false;
                }
            }
            return true;
View Full Code Here

    public ImmutableDoubleBooleanMap newWithoutAllKeys(DoubleIterable keys)
    {
        MutableDoubleBooleanMap map = new DoubleBooleanHashMap(this.size());
        map.putAll(this);
        DoubleIterator iterator = keys.doubleIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

        }

        public boolean removeAll(DoubleIterable source)
        {
            int oldSize = DoubleIntHashMap.this.size();
            DoubleIterator iterator = source.doubleIterator();
            while (iterator.hasNext())
            {
                DoubleIntHashMap.this.removeKey(iterator.next());
            }
            return oldSize != DoubleIntHashMap.this.size();
        }
View Full Code Here

            return true;
        }

        public boolean containsAll(DoubleIterable source)
        {
            DoubleIterator iterator = source.doubleIterator();
            while (iterator.hasNext())
            {
                if (!DoubleIntHashMap.this.containsKey(iterator.next()))
                {
                    return false;
                }
            }
            return true;
View Full Code Here

        this.function = function;
    }

    public DoubleIterator doubleIterator()
    {
        return new DoubleIterator()
        {
            private final Iterator<T> iterator = CollectDoubleIterable.this.iterable.iterator();

            public double next()
            {
View Full Code Here

            return sum;
        }

        public double max()
        {
            DoubleIterator doubleIterator = this.doubleIterator();
            double max = doubleIterator.next();
            while (doubleIterator.hasNext())
            {
                max = (double) Math.max(max, doubleIterator.next());
            }
            return max;
        }
View Full Code Here

            return max;
        }

        public double min()
        {
            DoubleIterator doubleIterator = this.doubleIterator();
            double min = doubleIterator.next();
            while (doubleIterator.hasNext())
            {
                min = (double) Math.min(min, doubleIterator.next());
            }
            return min;
        }
View Full Code Here

    {
        try
        {
            appendable.append(start);

            DoubleIterator iterator = iterable.doubleIterator();
            if (iterator.hasNext())
            {
                appendable.append(stringValueOfItem(iterable, iterator.next()));
                while (iterator.hasNext())
                {
                    appendable.append(separator);
                    appendable.append(stringValueOfItem(iterable, iterator.next()));
                }
            }

            appendable.append(end);
        }
View Full Code Here

TOP

Related Classes of com.gs.collections.api.iterator.DoubleIterator

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.