Java Thread Callable copyInto(final List list, final double[] data)

Here you can find the source of copyInto(final List list, final double[] data)

Description

copy Into

License

Open Source License

Declaration

public static Callable copyInto(final List list, final double[] data) 

Method Source Code


//package com.java2s;
import java.util.concurrent.*;
import java.util.List;

public class Main {
    public static Callable copyInto(final List list, final double[] data) {
        Callable c = new Callable() {
            public Object call() throws Exception {
                for (int i = 0; i < data.length; i++) {
                    list.add(data[i]);/*from   w w w. jav a  2  s . com*/
                }
                return list;
            }
        };
        return c;
    }
}

Related

  1. callConditionAndReturnResult(Callable condition)
  2. callInLoader(Callable body, ClassLoader loader)
  3. callInLocale(Locale locale, Callable task)
  4. callWithSystemProperty(String name, String value, Callable callee)
  5. copyFromList(final List list, final double[][] data, final int cols)
  6. executeLocally(Callable task)
  7. executeUntilNonNullOrTimeout(final long timeoutMs, final long timeBetweenPollsMs, final Callable callable)
  8. executeWithClassLoader(ClassLoader classLoader, Callable callable)
  9. expectException(Callable callable, Class exception)