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

Examples of com.gs.collections.impl.map.mutable.primitive.IntFloatHashMap


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

    ImmutableIntFloatHashMap(IntFloatMap delegate)
    {
        this.delegate = new IntFloatHashMap(delegate);
    }
View Full Code Here


        return this.delegate.asLazy();
    }

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

        return map.toImmutable();
    }

    public ImmutableIntFloatMap newWithoutKey(int key)
    {
        MutableIntFloatMap map = new IntFloatHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableIntFloatMap newWithoutAllKeys(IntIterable keys)
    {
        MutableIntFloatMap map = new IntFloatHashMap(this.size());
        map.putAll(this);
        IntIterator iterator = keys.intIterator();
        while (iterator.hasNext())
        {
            map.removeKey(iterator.next());
        }
        return map.toImmutable();
    }
View Full Code Here

        }

        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
        {
            int size = in.readInt();
            MutableIntFloatMap deserializedMap = new IntFloatHashMap();

            for (int i = 0; i < size; i++)
            {
                deserializedMap.put(in.readInt(), in.readFloat());
            }

            this.map = deserializedMap;
        }
View Full Code Here

    }

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

                : new IntFloatHashMap().toImmutable();
    }

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

TOP

Related Classes of com.gs.collections.impl.map.mutable.primitive.IntFloatHashMap

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.