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

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


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

    ImmutableFloatShortHashMap(FloatShortMap delegate)
    {
        this.delegate = new FloatShortHashMap(delegate);
    }
View Full Code Here


        return this.delegate.asLazy();
    }

    public ImmutableFloatShortMap newWithKeyValue(float key, short value)
    {
        MutableFloatShortMap map = new FloatShortHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableFloatShortMap newWithoutKey(float key)
    {
        MutableFloatShortMap map = new FloatShortHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableFloatShortMap newWithoutAllKeys(FloatIterable keys)
    {
        MutableFloatShortMap map = new FloatShortHashMap(this.size());
        map.putAll(this);
        FloatIterator iterator = keys.floatIterator();
        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();
            MutableFloatShortMap deserializedMap = new FloatShortHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

    }

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

                : new FloatShortHashMap().toImmutable();
    }

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

TOP

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

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.