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

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


    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectChar on null");
        }
        MutableCharList result = new CharArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(charFunction.charValueOf(each));
        }
        return result;
    }
View Full Code Here


     */
    public static <K, V> MutableCharCollection collectChar(
            Map<K, V> map,
            CharFunction<? super V> charFunction)
    {
        return collectChar(map, charFunction, new CharArrayList(map.size()));
    }
View Full Code Here

        return this.toList().toArray();
    }

    public MutableCharList toList()
    {
        final MutableCharList list = new CharArrayList();
        this.forEach(new CharProcedure()
        {
            public void value(char each)
            {
                list.add(each);
            }
        });
        return list;
    }
View Full Code Here

        return result;
    }

    public MutableCharList collectChar(CharFunction<? super V> charFunction)
    {
        CharArrayList result = new CharArrayList(this.size());
        this.forEach(new CollectCharProcedure<V>(charFunction, result));
        return result;
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableCharList collectChar(CharFunction<? super V> charFunction)
    {
        CharArrayList result = new CharArrayList(this.size());
        this.forEach(new CollectCharProcedure<V>(charFunction, result));
        return result.toImmutable();
    }
View Full Code Here

        if (count == 0)
        {
            return this;
        }
        this.checkSizeLessThanCount(count);
        CharArrayList newDelegate = CharArrayList.newList(this.delegate);
        while (count > 0)
        {
            newDelegate.removeAtIndex(newDelegate.size() - 1);
            count--;
        }
        return CharStacks.immutable.with(newDelegate.toArray());
    }
View Full Code Here

    {
        this.checkNegativeCount(count);
        this.checkSizeLessThanCount(count);
        if (count == 0)
        {
            return new CharArrayList();
        }
        MutableCharList subList = new CharArrayList(count);
        int index = this.delegate.size() - 1;
        for (int i = 0; i < count; i++)
        {
            subList.add(this.delegate.get(index - i));
        }
        return subList;
    }
View Full Code Here

        }

        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
        {
            int size = in.readInt();
            CharArrayList deserializedDelegate = new CharArrayList(size);

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

            this.stack = ImmutableCharArrayStack.newStackFromTopToBottom(deserializedDelegate);
        }
View Full Code Here

    }

    @Override
    public MutableCharList collectChar(CharFunction<? super T> charFunction)
    {
        CharArrayList result = new CharArrayList(this.size());
        this.forEach(new CollectCharProcedure<T>(charFunction, result));
        return result;
    }
View Full Code Here

    private final CharArrayList delegate;

    private ImmutableCharArrayStack(char[] newElements)
    {
        this.checkOptimizedSize(newElements.length);
        this.delegate = new CharArrayList(newElements);
    }
View Full Code Here

TOP

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

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.