Package com.gs.collections.api.block.procedure.primitive

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


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


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

        this.function = function;
    }

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

        });
    }

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

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

        });
    }

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

    }

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

    }

    public MutableByteSet toSet()
    {
        final MutableByteSet set = new ByteHashSet();
        this.forEach(new ByteProcedure()
        {
            public void value(byte each)
            {
                set.add(each);
            }
View Full Code Here

    }

    public MutableByteBag toBag()
    {
        final MutableByteBag bag = new ByteHashBag();
        this.forEach(new ByteProcedure()
        {
            public void value(byte each)
            {
                bag.add(each);
            }
View Full Code Here

        public ImmutableByteSet select(final BytePredicate predicate)
        {
            final ByteHashSet result = new ByteHashSet();

            this.forEach(new ByteProcedure()
            {
                public void value(byte value)
                {
                    if (predicate.accept(value))
                    {
View Full Code Here

        public ImmutableByteSet reject(final BytePredicate predicate)
        {
            final MutableByteSet result = new ByteHashSet();

            this.forEach(new ByteProcedure()
            {
                public void value(byte value)
                {
                    if (!predicate.accept(value))
                    {
View Full Code Here

TOP

Related Classes of com.gs.collections.api.block.procedure.primitive.ByteProcedure

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.