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

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


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

    ImmutableByteBooleanHashMap(ByteBooleanMap delegate)
    {
        this.delegate = new ByteBooleanHashMap(delegate);
    }
View Full Code Here


        return this.delegate.asLazy();
    }

    public ImmutableByteBooleanMap newWithKeyValue(byte key, boolean value)
    {
        MutableByteBooleanMap map = new ByteBooleanHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableByteBooleanMap newWithoutKey(byte key)
    {
        MutableByteBooleanMap map = new ByteBooleanHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableByteBooleanMap newWithoutAllKeys(ByteIterable keys)
    {
        MutableByteBooleanMap map = new ByteBooleanHashMap(this.size());
        map.putAll(this);
        ByteIterator iterator = keys.byteIterator();
        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();
            MutableByteBooleanMap deserializedMap = new ByteBooleanHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

    }

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

                : new ByteBooleanHashMap().toImmutable();
    }

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

TOP

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

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.