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

Examples of com.gs.collections.impl.set.mutable.primitive.ShortHashSet


        return result.toImmutable();
    }

    public ImmutableShortSet collectShort(ShortFunction<? super T> shortFunction)
    {
        ShortHashSet result = new ShortHashSet(this.size());
        this.forEach(new CollectShortProcedure<T>(shortFunction, result));
        return result.toImmutable();
    }
View Full Code Here


        return new ShortArrayList();
    }

    public MutableShortSet toSet()
    {
        return new ShortHashSet();
    }
View Full Code Here

    }

    @Override
    public MutableShortSet collectShort(ShortFunction<? super T> shortFunction)
    {
        ShortHashSet result = new ShortHashSet(this.size());
        this.forEach(new CollectShortProcedure<T>(shortFunction, result));
        return result;
    }
View Full Code Here

        return 0;
    }

    public MutableShortSet toSet()
    {
        return new ShortHashSet();
    }
View Full Code Here

    }

    public ImmutableShortSet select(ShortPredicate predicate)
    {
        return predicate.accept(this.element) ? ShortHashSet.newSetWith(this.element).toImmutable()
                : new ShortHashSet().toImmutable();
    }
View Full Code Here

                : new ShortHashSet().toImmutable();
    }

    public ImmutableShortSet reject(ShortPredicate predicate)
    {
        return predicate.accept(this.element) ? new ShortHashSet().toImmutable()
                : ShortHashSet.newSetWith(this.element).toImmutable();
    }
View Full Code Here

        return new ShortArrayList();
    }

    public MutableShortSet toSet()
    {
        return new ShortHashSet();
    }
View Full Code Here

    }

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

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

        this.set = deserializedSet;
    }
View Full Code Here

            ShortLongHashMap.this.clear();
        }

        public MutableShortSet select(ShortPredicate predicate)
        {
            MutableShortSet result = new ShortHashSet();
            if (ShortLongHashMap.this.sentinelValues != null)
            {
                if (ShortLongHashMap.this.sentinelValues.containsZeroKey && predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ShortLongHashMap.this.sentinelValues.containsOneKey && predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (short key : ShortLongHashMap.this.keys)
            {
                if (isNonSentinel(key) && predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

            return result;
        }

        public MutableShortSet reject(ShortPredicate predicate)
        {
            MutableShortSet result = new ShortHashSet();
            if (ShortLongHashMap.this.sentinelValues != null)
            {
                if (ShortLongHashMap.this.sentinelValues.containsZeroKey && !predicate.accept(EMPTY_KEY))
                {
                    result.add(EMPTY_KEY);
                }
                if (ShortLongHashMap.this.sentinelValues.containsOneKey && !predicate.accept(REMOVED_KEY))
                {
                    result.add(REMOVED_KEY);
                }
            }
            for (short key : ShortLongHashMap.this.keys)
            {
                if (isNonSentinel(key) && !predicate.accept(key))
                {
                    result.add(key);
                }
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.set.mutable.primitive.ShortHashSet

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.