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

Examples of com.gs.collections.impl.map.mutable.primitive.ShortCharHashMap$KeysView


    }

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


                : new ShortCharHashMap().toImmutable();
    }

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

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

    ImmutableShortCharHashMap(ShortCharMap delegate)
    {
        this.delegate = new ShortCharHashMap(delegate);
    }
View Full Code Here

        return this.delegate.asLazy();
    }

    public ImmutableShortCharMap newWithKeyValue(short key, char value)
    {
        MutableShortCharMap map = new ShortCharHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableShortCharMap newWithoutKey(short key)
    {
        MutableShortCharMap map = new ShortCharHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableShortCharMap newWithoutAllKeys(ShortIterable keys)
    {
        MutableShortCharMap map = new ShortCharHashMap(this.size());
        map.putAll(this);
        ShortIterator iterator = keys.shortIterator();
        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();
            MutableShortCharMap deserializedMap = new ShortCharHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.map.mutable.primitive.ShortCharHashMap$KeysView

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.