- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
/** * Samples a a given number of items from a list with replacement. * * @param <DataType> * The type of data in the list. * @param random * The random number generator. * @param data * The list to sample from. * @param sampleSize * The sample size. Must be positive. * @return * An array list of the given size sampled with replacement from the * given data. */ public static <DataType> ArrayList<DataType> sampleWithReplacement( final Random random, final List<? extends DataType> data, final int sampleSize) { final ArrayList<DataType> result = new ArrayList<DataType>(sampleSize); sampleWithReplacementInto(random, data, sampleSize, result); return result; }
/** * Samples a a given number of items from a list with replacement. * * @param <DataType> * The type of data in the list. * @param random * The random number generator. * @param data * The list to sample from. * @param sampleSize * The sample size. Must be positive. * @return * An array list of the given size sampled with replacement from the * given data. */ public static <DataType> ArrayList<DataType> sampleWithReplacement( final Random random, final List<? extends DataType> data, final int sampleSize) { final ArrayList<DataType> result = new ArrayList<DataType>(sampleSize); sampleWithReplacementInto(random, data, sampleSize, result); return result; }
/** * Samples a a given number of items from a list with replacement. * * @param <DataType> * The type of data in the list. * @param random * The random number generator. * @param data * The list to sample from. * @param sampleSize * The sample size. Must be positive. * @return * An array list of the given size sampled with replacement from the * given data. */ public static <DataType> ArrayList<DataType> sampleWithReplacement( final Random random, final List<? extends DataType> data, final int sampleSize) { final ArrayList<DataType> result = new ArrayList<DataType>(sampleSize); sampleWithReplacementInto(random, data, sampleSize, result); return result; }