Package com.gs.collections.api.set.primitive

Examples of com.gs.collections.api.set.primitive.MutableByteSet


        return list;
    }

    public MutableByteSet toSet()
    {
        final MutableByteSet set = new ByteHashSet();
        this.forEach(new ByteProcedure()
        {
            public void value(byte each)
            {
                set.add(each);
            }
        });
        return set;
    }
View Full Code Here


        return result;
    }

    public MutableByteSet reject(final BytePredicate predicate)
    {
        final MutableByteSet result = new ByteHashSet();

        this.forEach(new ByteProcedure()
        {
            public void value(byte value)
            {
                if (!predicate.accept(value))
                {
                    result.add(value);
                }
            }
        });

        return result;
View Full Code Here

            return result.toImmutable();
        }

        public ImmutableByteSet reject(final BytePredicate predicate)
        {
            final MutableByteSet result = new ByteHashSet();

            this.forEach(new ByteProcedure()
            {
                public void value(byte value)
                {
                    if (!predicate.accept(value))
                    {
                        result.add(value);
                    }
                }
            });

            return result.toImmutable();
        }
View Full Code Here

    }

    public void readExternal(ObjectInput in) throws IOException
    {
        int size = in.readInt();
        MutableByteSet deserializedSet = new ByteHashSet(size);

        for (int i = 0; i < size; i++)
        {
            deserializedSet.add(in.readByte());
        }

        this.set = deserializedSet;
    }
View Full Code Here

        return result;
    }

    public MutableByteSet toSet()
    {
        MutableByteSet result = new ByteHashSet(this.size());

        for (int i = 0; i < this.keys.length; i++)
        {
            if (isNonSentinel(this.keys[i]))
            {
                result.add(this.values[i]);
            }
        }
        return result;
    }
View Full Code Here

            ByteCharHashMap.this.clear();
        }

        public MutableByteSet select(BytePredicate predicate)
        {
            MutableByteSet result = new ByteHashSet();
            if (ByteCharHashMap.this.sentinelValues != null)
            {
                if (ByteCharHashMap.this.sentinelValues.containsZeroKey && predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ByteCharHashMap.this.sentinelValues.containsOneKey && predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (byte key : ByteCharHashMap.this.keys)
            {
                if (isNonSentinel(key) && predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

            return result;
        }

        public MutableByteSet reject(BytePredicate predicate)
        {
            MutableByteSet result = new ByteHashSet();
            if (ByteCharHashMap.this.sentinelValues != null)
            {
                if (ByteCharHashMap.this.sentinelValues.containsZeroKey && !predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ByteCharHashMap.this.sentinelValues.containsOneKey && !predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (byte key : ByteCharHashMap.this.keys)
            {
                if (isNonSentinel(key) && !predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

            ByteDoubleHashMap.this.clear();
        }

        public MutableByteSet select(BytePredicate predicate)
        {
            MutableByteSet result = new ByteHashSet();
            if (ByteDoubleHashMap.this.sentinelValues != null)
            {
                if (ByteDoubleHashMap.this.sentinelValues.containsZeroKey && predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ByteDoubleHashMap.this.sentinelValues.containsOneKey && predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (byte key : ByteDoubleHashMap.this.keys)
            {
                if (isNonSentinel(key) && predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

            return result;
        }

        public MutableByteSet reject(BytePredicate predicate)
        {
            MutableByteSet result = new ByteHashSet();
            if (ByteDoubleHashMap.this.sentinelValues != null)
            {
                if (ByteDoubleHashMap.this.sentinelValues.containsZeroKey && !predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ByteDoubleHashMap.this.sentinelValues.containsOneKey && !predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (byte key : ByteDoubleHashMap.this.keys)
            {
                if (isNonSentinel(key) && !predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

            ByteIntHashMap.this.clear();
        }

        public MutableByteSet select(BytePredicate predicate)
        {
            MutableByteSet result = new ByteHashSet();
            if (ByteIntHashMap.this.sentinelValues != null)
            {
                if (ByteIntHashMap.this.sentinelValues.containsZeroKey && predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ByteIntHashMap.this.sentinelValues.containsOneKey && predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (byte key : ByteIntHashMap.this.keys)
            {
                if (isNonSentinel(key) && predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of com.gs.collections.api.set.primitive.MutableByteSet

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.