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

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


            ByteFunction<? super T> byteFunction)
    {
        int size = list.size();
        if (ArrayListIterate.isOptimizableArrayList(list, size))
        {
            MutableByteList result = new ByteArrayList(size);
            return ArrayListIterate.collectByteFromInternalArray(list, byteFunction, size, result);
        }
        return RandomAccessListIterate.collectByte(list, byteFunction);
    }
View Full Code Here


     */
    public static <T> MutableByteCollection collectByte(
            Iterator<T> iterator,
            ByteFunction<? super T> byteFunction)
    {
        MutableByteCollection result = new ByteArrayList();
        while (iterator.hasNext())
        {
            result.add(byteFunction.byteValueOf(iterator.next()));
        }
        return result;
    }
View Full Code Here

        return result;
    }

    public MutableByteList collectByte(ByteFunction<? super T> byteFunction)
    {
        ByteArrayList result = new ByteArrayList(this.size());
        this.forEach(new CollectByteProcedure<T>(byteFunction, result));
        return result;
    }
View Full Code Here

        return result.toImmutable();
    }

    public ImmutableByteList collectByte(ByteFunction<? super T> byteFunction)
    {
        ByteArrayList result = new ByteArrayList(this.size());
        this.forEach(new CollectByteProcedure<T>(byteFunction, result));
        return result.toImmutable();
    }
View Full Code Here

    }

    @Override
    public MutableByteList collectByte(ByteFunction<? super T> byteFunction)
    {
        ByteArrayList result = new ByteArrayList(this.size());
        this.forEach(new CollectByteProcedure<T>(byteFunction, result));
        return result;
    }
View Full Code Here

        throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".groupByUniqueKey() not implemented yet");
    }

    public MutableByteList collectByte(final ByteFunction<? super T> byteFunction)
    {
        final MutableByteList result = new ByteArrayList();
        this.forEachWithOccurrences(new ObjectIntProcedure<T>()
        {
            public void value(T each, int occurrences)
            {
                byte element = byteFunction.byteValueOf(each);
                for (int i = 0; i < occurrences; i++)
                {
                    result.add(element);
                }
            }
        });
        return result;
    }
View Full Code Here

    {
        if (objectArray == null)
        {
            throw new IllegalArgumentException("Cannot perform a collectByte on null");
        }
        MutableByteList result = new ByteArrayList(objectArray.length);
        for (T each : objectArray)
        {
            result.add(byteFunction.byteValueOf(each));
        }
        return result;
    }
View Full Code Here

     */
    public static <K, V> MutableByteCollection collectByte(
            Map<K, V> map,
            ByteFunction<? super V> byteFunction)
    {
        return collectByte(map, byteFunction, new ByteArrayList(map.size()));
    }
View Full Code Here

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

    public MutableByteList toList()
    {
        final MutableByteList list = new ByteArrayList();
        this.forEach(new ByteProcedure()
        {
            public void value(byte each)
            {
                list.add(each);
            }
        });
        return list;
    }
View Full Code Here

        return result;
    }

    public MutableByteList collectByte(ByteFunction<? super V> byteFunction)
    {
        ByteArrayList result = new ByteArrayList(this.size());
        this.forEach(new CollectByteProcedure<V>(byteFunction, result));
        return result;
    }
View Full Code Here

TOP

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

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.