Package com.gs.collections.api.iterator

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


        public boolean removeAll(ShortIterable source)
        {
            int oldSize = ObjectShortHashMap.this.size();

            ShortIterator iterator = source.shortIterator();
            while (iterator.hasNext())
            {
                this.remove(iterator.next());
            }
            return oldSize != ObjectShortHashMap.this.size();
        }
View Full Code Here


    {
        if (this.isEmpty())
        {
            throw new NoSuchElementException();
        }
        ShortIterator iterator = this.shortIterator();
        short max = iterator.next();
        while (iterator.hasNext())
        {
            short value = iterator.next();
            if (max < value)
            {
                max = value;
            }
        }
View Full Code Here

    {
        if (this.isEmpty())
        {
            throw new NoSuchElementException();
        }
        ShortIterator iterator = this.shortIterator();
        short min = iterator.next();
        while (iterator.hasNext())
        {
            short value = iterator.next();
            if (value < min)
            {
                min = value;
            }
        }
View Full Code Here

        public boolean removeAll(ShortIterable source)
        {
            int oldSize = IntShortHashMap.this.size();

            ShortIterator iterator = source.shortIterator();
            while (iterator.hasNext())
            {
                this.remove(iterator.next());
            }
            return oldSize != IntShortHashMap.this.size();
        }
View Full Code Here

            return sum;
        }

        public short max()
        {
            ShortIterator shortIterator = this.shortIterator();
            short max = shortIterator.next();
            while (shortIterator.hasNext())
            {
                max = (short) Math.max(max, shortIterator.next());
            }
            return max;
        }
View Full Code Here

            return max;
        }

        public short min()
        {
            ShortIterator shortIterator = this.shortIterator();
            short min = shortIterator.next();
            while (shortIterator.hasNext())
            {
                min = (short) Math.min(min, shortIterator.next());
            }
            return min;
        }
View Full Code Here

        this.function = function;
    }

    public ShortIterator shortIterator()
    {
        return new ShortIterator()
        {
            private final Iterator<T> iterator = CollectShortIterable.this.iterable.iterator();

            public short next()
            {
View Full Code Here

    {
        try
        {
            appendable.append(start);

            ShortIterator iterator = iterable.shortIterator();
            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

        return new ReverseShortIterator();
    }

    public void forEach(ShortProcedure procedure)
    {
        ShortIterator iterator = this.shortIterator();
        while (iterator.hasNext())
        {
            procedure.value(iterator.next());
        }
    }
View Full Code Here

    @Override
    public short[] toArray()
    {
        short[] results = new short[this.adapted.size()];
        int index = 0;
        ShortIterator iterator = this.shortIterator();
        while (iterator.hasNext())
        {
            results[index] = iterator.next();
            index++;
        }
        return results;
    }
View Full Code Here

TOP

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

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.