Package com.gs.collections.api.iterator

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


    @Override
    public int hashCode()
    {
        int hashCode = 1;
        LongIterable iterable = this.delegate.asReversed();
        LongIterator iterator = iterable.longIterator();
        while (iterator.hasNext())
        {
            long item = iterator.next();
            hashCode = 31 * hashCode + (int) (item ^ item >>> 32);
        }
        return hashCode;
    }
View Full Code Here


    @Override
    public int hashCode()
    {
        int hashCode = 1;
        LongIterable iterable = this.delegate.asReversed();
        LongIterator iterator = iterable.longIterator();
        while (iterator.hasNext())
        {
            long item = iterator.next();
            hashCode = 31 * hashCode + (int) (item ^ item >>> 32);
        }
        return hashCode;
    }
View Full Code Here

    }

    public void writeExternal(ObjectOutput out) throws IOException
    {
        out.writeInt(this.size());
        LongIterator iterator = this.delegate.asReversed().longIterator();
        while (iterator.hasNext())
        {
            long each = iterator.next();
            out.writeLong(each);
        }
    }
View Full Code Here

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

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

    public ImmutableLongLongMap newWithoutAllKeys(LongIterable keys)
    {
        MutableLongLongMap map = new LongLongHashMap(this.size());
        map.putAll(this);
        LongIterator iterator = keys.longIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

    public ImmutableLongBooleanMap newWithoutAllKeys(LongIterable keys)
    {
        MutableLongBooleanMap map = new LongBooleanHashMap(this.size());
        map.putAll(this);
        LongIterator iterator = keys.longIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

        public boolean removeAll(LongIterable source)
        {
            int oldSize = CharLongHashMap.this.size();

            LongIterator iterator = source.longIterator();
            while (iterator.hasNext())
            {
                this.remove(iterator.next());
            }
            return oldSize != CharLongHashMap.this.size();
        }
View Full Code Here

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

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

TOP

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

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.