Package com.gs.collections.api.map.primitive

Examples of com.gs.collections.api.map.primitive.MutableByteShortMap


        return this.delegate.asLazy();
    }

    public ImmutableByteShortMap newWithKeyValue(byte key, short value)
    {
        MutableByteShortMap map = new ByteShortHashMap(this.size() + 1);
        map.putAll(this);
        map.put(key, value);
        return map.toImmutable();
    }
View Full Code Here


        return map.toImmutable();
    }

    public ImmutableByteShortMap newWithoutKey(byte key)
    {
        MutableByteShortMap map = new ByteShortHashMap(this.size());
        map.putAll(this);
        map.removeKey(key);
        return map.toImmutable();
    }
View Full Code Here

        return map.toImmutable();
    }

    public ImmutableByteShortMap newWithoutAllKeys(ByteIterable keys)
    {
        MutableByteShortMap map = new ByteShortHashMap(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();
            MutableByteShortMap deserializedMap = new ByteShortHashMap();

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

            this.map = deserializedMap;
        }
View Full Code Here

TOP

Related Classes of com.gs.collections.api.map.primitive.MutableByteShortMap

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.