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

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


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

    ImmutableDoubleBooleanHashMap(DoubleBooleanMap delegate)
    {
        this.delegate = new DoubleBooleanHashMap(delegate);
    }
View Full Code Here


        return this.delegate.asLazy();
    }

    public ImmutableDoubleBooleanMap newWithKeyValue(double key, boolean value)
    {
        MutableDoubleBooleanMap map = new DoubleBooleanHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableDoubleBooleanMap newWithoutKey(double key)
    {
        MutableDoubleBooleanMap map = new DoubleBooleanHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableDoubleBooleanMap newWithoutAllKeys(DoubleIterable keys)
    {
        MutableDoubleBooleanMap map = new DoubleBooleanHashMap(this.size());
        map.putAll(this);
        DoubleIterator iterator = keys.doubleIterator();
        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();
            MutableDoubleBooleanMap deserializedMap = new DoubleBooleanHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

    }

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

                : new DoubleBooleanHashMap().toImmutable();
    }

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

TOP

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

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.