Package com.gs.collections.api.iterator

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


    @Override
    public int hashCode()
    {
        int hashCode = 1;
        ShortIterable iterable = this.delegate.asReversed();
        ShortIterator iterator = iterable.shortIterator();
        while (iterator.hasNext())
        {
            short item = iterator.next();
            hashCode = 31 * hashCode + (int) item;
        }
        return hashCode;
    }
View Full Code Here


                }
            });
        }
        else
        {
            ShortIterator iterator = source.shortIterator();
            while (iterator.hasNext())
            {
                short each = iterator.next();
                this.add(each);
            }
        }
        return true;
    }
View Full Code Here

    }

    public void writeExternal(ObjectOutput out) throws IOException
    {
        out.writeInt(this.size());
        ShortIterator iterator = this.delegate.asReversed().shortIterator();
        while (iterator.hasNext())
        {
            short each = iterator.next();
            out.writeShort(each);
        }
    }
View Full Code Here

                }
            });
        }
        else
        {
            ShortIterator iterator = source.shortIterator();
            while (iterator.hasNext())
            {
                short 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, ObjectShortToObjectFunction<? super T, ? extends T> function)
    {
        T result = injectedValue;
        ShortIterator it = this.shortIterator();
        while (it.hasNext())
        {
            result = function.valueOf(result, it.next());
        }
        return result;
    }
View Full Code Here

                }
            }
        }
        else
        {
            ShortIterator iterator = source.shortIterator();
            while (iterator.hasNext())
            {
                short item = iterator.next();
                this.add(item);
            }
        }
        return this.size() != oldSize;
    }
View Full Code Here

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

    @Override
    public int hashCode()
    {
        int hashCode = 1;
        ShortIterable iterable = this.delegate.asReversed();
        ShortIterator iterator = iterable.shortIterator();
        while (iterator.hasNext())
        {
            short item = iterator.next();
            hashCode = 31 * hashCode + (int) item;
        }
        return hashCode;
    }
View Full Code Here

    }

    public ImmutableShortObjectMap<V> newWithoutAllKeys(ShortIterable keys)
    {
        ShortObjectHashMap<V> map = new ShortObjectHashMap<V>(this);
        ShortIterator iterator = keys.shortIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

    public ImmutableShortCharMap newWithoutAllKeys(ShortIterable keys)
    {
        MutableShortCharMap map = new ShortCharHashMap(this.size());
        map.putAll(this);
        ShortIterator iterator = keys.shortIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
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.