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

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


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

    ImmutableIntBooleanHashMap(IntBooleanMap delegate)
    {
        this.delegate = new IntBooleanHashMap(delegate);
    }
View Full Code Here


        return this.delegate.asLazy();
    }

    public ImmutableIntBooleanMap newWithKeyValue(int key, boolean value)
    {
        MutableIntBooleanMap map = new IntBooleanHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableIntBooleanMap newWithoutKey(int key)
    {
        MutableIntBooleanMap map = new IntBooleanHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableIntBooleanMap newWithoutAllKeys(IntIterable keys)
    {
        MutableIntBooleanMap map = new IntBooleanHashMap(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();
            MutableIntBooleanMap deserializedMap = new IntBooleanHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

    }

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

                : new IntBooleanHashMap().toImmutable();
    }

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

TOP

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

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.