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

Examples of com.gs.collections.impl.list.mutable.primitive.ShortArrayList


        return result;
    }

    public MutableShortCollection select(ShortPredicate predicate)
    {
        ShortArrayList result = new ShortArrayList();

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


        return result;
    }

    public MutableShortCollection reject(ShortPredicate predicate)
    {
        ShortArrayList result = new ShortArrayList();

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

        return (double) sortedArray[middleIndex];
    }

    public MutableShortList toList()
    {
        MutableShortList result = new ShortArrayList(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

        return !predicate.accept(this.value1);
    }

    public ImmutableShortCollection select(ShortPredicate predicate)
    {
        return predicate.accept(this.value1) ? ShortArrayList.newListWith(this.value1).toImmutable() : new ShortArrayList().toImmutable();
    }
View Full Code Here

        return predicate.accept(this.value1) ? ShortArrayList.newListWith(this.value1).toImmutable() : new ShortArrayList().toImmutable();
    }

    public ImmutableShortCollection reject(ShortPredicate predicate)
    {
        return predicate.accept(this.value1) ? new ShortArrayList().toImmutable() : ShortArrayList.newListWith(this.value1).toImmutable();
    }
View Full Code Here

        this.forEachValue(procedure);
    }

    public MutableShortCollection select(ShortPredicate predicate)
    {
        ShortArrayList result = new ShortArrayList();

        if (this.sentinelValues != null)
        {
            if (this.sentinelValues.containsZeroKey && predicate.accept(this.sentinelValues.zeroValue))
            {
                result.add(this.sentinelValues.zeroValue);
            }
            if (this.sentinelValues.containsOneKey && predicate.accept(this.sentinelValues.oneValue))
            {
                result.add(this.sentinelValues.oneValue);
            }
        }
        for (int i = 0; i < this.keys.length; i++)
        {
            if (isNonSentinel(this.keys[i]) && predicate.accept(this.values[i]))
            {
                result.add(this.values[i]);
            }
        }

        return result;
    }
View Full Code Here

        return result;
    }

    public MutableShortCollection reject(ShortPredicate predicate)
    {
        ShortArrayList result = new ShortArrayList();
        if (this.sentinelValues != null)
        {
            if (this.sentinelValues.containsZeroKey && !predicate.accept(this.sentinelValues.zeroValue))
            {
                result.add(this.sentinelValues.zeroValue);
            }
            if (this.sentinelValues.containsOneKey && !predicate.accept(this.sentinelValues.oneValue))
            {
                result.add(this.sentinelValues.oneValue);
            }
        }
        for (int i = 0; i < this.keys.length; i++)
        {
            if (isNonSentinel(this.keys[i]) && !predicate.accept(this.values[i]))
            {
                result.add(this.values[i]);
            }
        }
        return result;
    }
View Full Code Here

        return new short[0];
    }

    public MutableShortList toSortedList()
    {
        return new ShortArrayList();
    }
View Full Code Here

        return source.isEmpty();
    }

    public MutableShortList toList()
    {
        return new ShortArrayList();
    }
View Full Code Here

        return UnmodifiableDoubleSet.of(new DoubleHashSet());
    }

    public MutableShortCollection values()
    {
        return UnmodifiableShortCollection.of(new ShortArrayList());
    }
View Full Code Here

TOP

Related Classes of com.gs.collections.impl.list.mutable.primitive.ShortArrayList

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.