Package com.gs.collections.impl.map.mutable.primitive

Examples of com.gs.collections.impl.map.mutable.primitive.FloatIntHashMap$KeysView


    private FloatIntHashMap items;
    private int size;

    public FloatHashBag()
    {
        this.items = new FloatIntHashMap();
    }
View Full Code Here


        this.items = new FloatIntHashMap();
    }

    public FloatHashBag(int size)
    {
        this.items = new FloatIntHashMap(size);
    }
View Full Code Here

        this.addAll(iterable);
    }

    public FloatHashBag(FloatHashBag bag)
    {
        this.items = new FloatIntHashMap(bag.sizeDistinct());
        bag.forEachWithOccurrences(new FloatIntProcedure()
        {
            public void value(float item, int occurrences)
            {
                FloatHashBag.this.addOccurrences(item, occurrences);
View Full Code Here

    }

    public void readExternal(ObjectInput in) throws IOException
    {
        int size = in.readInt();
        this.items = new FloatIntHashMap(size);
        for (int i = 0; i < size; i++)
        {
            this.addOccurrences(in.readFloat(), in.readInt());
        }
    }
View Full Code Here

    }

    public ImmutableFloatIntMap select(FloatIntPredicate predicate)
    {
        return predicate.accept(this.key1, this.value1) ? FloatIntHashMap.newWithKeysValues(this.key1, this.value1).toImmutable()
                : new FloatIntHashMap().toImmutable();
    }
View Full Code Here

                : new FloatIntHashMap().toImmutable();
    }

    public ImmutableFloatIntMap reject(FloatIntPredicate predicate)
    {
        return predicate.accept(this.key1, this.value1) ? new FloatIntHashMap().toImmutable()
                : FloatIntHashMap.newWithKeysValues(this.key1, this.value1).toImmutable();
    }
View Full Code Here

    private static final long serialVersionUID = 1L;
    private final MutableFloatIntMap delegate;

    ImmutableFloatIntHashMap(FloatIntMap delegate)
    {
        this.delegate = new FloatIntHashMap(delegate);
    }
View Full Code Here

        return this.delegate.asLazy();
    }

    public ImmutableFloatIntMap newWithKeyValue(float key, int value)
    {
        MutableFloatIntMap map = new FloatIntHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableFloatIntMap newWithoutKey(float key)
    {
        MutableFloatIntMap map = new FloatIntHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableFloatIntMap newWithoutAllKeys(FloatIterable keys)
    {
        MutableFloatIntMap map = new FloatIntHashMap(this.size());
        map.putAll(this);
        FloatIterator iterator = keys.floatIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.map.mutable.primitive.FloatIntHashMap$KeysView

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.