Package com.gs.collections.api.iterator

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


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


                }
            });
        }
        else
        {
            FloatIterator iterator = source.floatIterator();
            while (iterator.hasNext())
            {
                float each = iterator.next();
                this.add(each);
            }
        }
        return true;
    }
View Full Code Here

                }
            });
        }
        else
        {
            FloatIterator iterator = source.floatIterator();
            while (iterator.hasNext())
            {
                float each = iterator.next();
                int occurrences = this.items.removeKeyIfAbsent(each, 0);
                this.size -= occurrences;
            }
        }
        return this.size() != oldSize;
View Full Code Here

    }

    public <T> T injectInto(T injectedValue, ObjectFloatToObjectFunction<? super T, ? extends T> function)
    {
        T result = injectedValue;
        FloatIterator it = this.floatIterator();
        while (it.hasNext())
        {
            result = function.valueOf(result, it.next());
        }
        return result;
    }
View Full Code Here

    @Override
    public int hashCode()
    {
        int hashCode = 1;
        FloatIterable iterable = this.delegate.asReversed();
        FloatIterator iterator = iterable.floatIterator();
        while (iterator.hasNext())
        {
            float item = iterator.next();
            hashCode = 31 * hashCode + Float.floatToIntBits(item);
        }
        return hashCode;
    }
View Full Code Here

    }

    public void writeExternal(ObjectOutput out) throws IOException
    {
        out.writeInt(this.size());
        FloatIterator iterator = this.delegate.asReversed().floatIterator();
        while (iterator.hasNext())
        {
            float each = iterator.next();
            out.writeFloat(each);
        }
    }
View Full Code Here

        public boolean removeAll(FloatIterable source)
        {
            int oldSize = CharFloatHashMap.this.size();

            FloatIterator iterator = source.floatIterator();
            while (iterator.hasNext())
            {
                this.remove(iterator.next());
            }
            return oldSize != CharFloatHashMap.this.size();
        }
View Full Code Here

        }

        public boolean removeAll(FloatIterable source)
        {
            int oldSize = FloatLongHashMap.this.size();
            FloatIterator iterator = source.floatIterator();
            while (iterator.hasNext())
            {
                FloatLongHashMap.this.removeKey(iterator.next());
            }
            return oldSize != FloatLongHashMap.this.size();
        }
View Full Code Here

            return true;
        }

        public boolean containsAll(FloatIterable source)
        {
            FloatIterator iterator = source.floatIterator();
            while (iterator.hasNext())
            {
                if (!FloatLongHashMap.this.containsKey(iterator.next()))
                {
                    return false;
                }
            }
            return true;
View Full Code Here

    {
        if (this.isEmpty())
        {
            throw new NoSuchElementException();
        }
        FloatIterator iterator = this.floatIterator();
        float max = iterator.next();
        while (iterator.hasNext())
        {
            float value = iterator.next();
            if (Float.compare(max, value) < 0)
            {
                max = value;
            }
        }
View Full Code Here

TOP

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

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.