Examples of CharProcedure


Examples of com.carrotsearch.hppc.procedures.CharProcedure

    public void testForEachWithProcedure()
    {
        deque.addLast(sequence);

        final IntHolder count = new IntHolder();
        ((CharArrayDeque) deque).forEach(new CharProcedure() {
            int index = 0;
            public void apply(char v)
            {
                assertEquals2(sequence.buffer[index++], v);
                count.value++;
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

        public char[] toArray()
        {
            int size = CharObjectHashMap.this.size();
            final char[] result = new char[size];
            CharObjectHashMap.this.forEachKey(new CharProcedure()
            {
                private int index;

                public void value(char each)
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

        }
        if (map.size() == 1)
        {
            //TODO use keysView() when available.
            final char[] array = new char[1];
            map.forEachKey(new CharProcedure()
            {
                public void value(char each)
                {
                    array[0] = each;
                }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

    @Override
    public char[] toArray()
    {
        final char[] array = new char[this.size()];
        this.forEach(new CharProcedure()
        {
            @SuppressWarnings("FieldMayBeFinal")
            private int index = 0;
            public void value(char each)
            {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

        this.function = function;
    }

    public void forEach(final Procedure<? super V> procedure)
    {
        this.iterable.forEach(new CharProcedure()
        {
            public void value(char each)
            {
                procedure.value(CollectCharToObjectIterable.this.function.valueOf(each));
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

        });
    }

    public void forEachWithIndex(final ObjectIntProcedure<? super V> objectIntProcedure)
    {
        this.iterable.forEach(new CharProcedure()
        {
            private int index;

            public void value(char each)
            {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

        });
    }

    public <P> void forEachWith(final Procedure2<? super V, ? super P> procedure, final P parameter)
    {
        this.iterable.forEach(new CharProcedure()
        {
            public void value(char each)
            {
                procedure.value(CollectCharToObjectIterable.this.function.valueOf(each), parameter);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

     * @deprecated since 3.0. Use {@link #forEach(String, CharProcedure)} instead.
     */
    @Deprecated
    public static void forEach(String string, final com.gs.collections.impl.block.procedure.primitive.CharProcedure procedure)
    {
        StringIterate.forEach(string, new CharProcedure()
        {
            public void value(char each)
            {
                procedure.value(each);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

    }

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

Examples of com.gs.collections.api.block.procedure.primitive.CharProcedure

    }

    public MutableCharSet toSet()
    {
        final MutableCharSet set = new CharHashSet();
        this.forEach(new CharProcedure()
        {
            public void value(char each)
            {
                set.add(each);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.