本文整理了Java中scala.actors.threadpool.Arrays.asList()
方法的一些代码示例,展示了Arrays.asList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.asList()
方法的具体详情如下:
包路径:scala.actors.threadpool.Arrays
类名称:Arrays
方法名:asList
暂无
代码示例来源:origin: org.sonatype.flexmojos/flexmojos-coverage-reporter
@SuppressWarnings( "unchecked" )
public CoverageReportRequest( File dataDirectory, List<String> formats, String encoding, File reportDirectory,
File... sourcePath )
{
super();
this.dataDirectory = dataDirectory;
this.formats = formats;
this.encoding = encoding;
this.reportDirectory = reportDirectory;
this.sourcePath = Arrays.asList( sourcePath );
}
代码示例来源:origin: net.flexmojos.oss/flexmojos-coverage-reporter
@SuppressWarnings( "unchecked" )
public CoverageReportRequest( File dataDirectory, List<String> formats, String encoding, File reportDirectory,
File... sourcePath )
{
super();
this.dataDirectory = dataDirectory;
this.formats = formats;
this.encoding = encoding;
this.reportDirectory = reportDirectory;
this.sourcePath = Arrays.asList( sourcePath );
}
代码示例来源:origin: org.fusesource.fabric/process-manager
public Command(String... command) {
this(ImmutableList.copyOf(Arrays.asList(command)), DEFAULT_SUCCESSFUL_EXIT_CODES, DEFAULT_DIRECTORY, ImmutableMap.<String, String>of(), DEFAULT_TIME_LIMIT);
}
代码示例来源:origin: net.flexmojos.oss/flexmojos-maven-plugin
@SuppressWarnings( "unchecked" )
public static File[] getFiles( Artifact... dependencies )
{
if ( dependencies == null )
{
return null;
}
final Set<File> filesSet = getFilesSet(Arrays.asList(dependencies));
return filesSet.toArray(new File[filesSet.size()]);
}
代码示例来源:origin: org.fusesource.fabric/process-manager
public Command addArgs(String... args) {
Preconditions.checkNotNull(args, "args is null");
return addArgs(ImmutableList.copyOf(Arrays.asList(args)));
}
代码示例来源:origin: knightliao/CanalX
@Override
public void init(ICanalxContext iCanalxContext) throws Exception {
Preconditions.checkNotNull(iCanalxContext, "iCanalxContext can not be null");
//
String currentTopics = iCanalxContext.getProperty("canalx.plugin.injector.kafka.topics");
this.topics = currentTopics.split(",");
topicList = Arrays.asList(topics);
LOGGER.debug("injector config: topics:{}", topicList);
// load kafka config
loadConfigAndInit();
}
代码示例来源:origin: org.wicketstuff/wicketstuff-console-templates
private Long idForTemplate(final Lang lang, final String name)
{
final int major = lang.ordinal() * 1000;
final int minor = Arrays.asList(templateNamesForLang(lang)).indexOf(name);
return (long)(major + minor);
}
代码示例来源:origin: openimaj/openimaj
Parallel.forEach(Arrays.asList(indir.listFiles()), new Operation<File>() {
代码示例来源:origin: org.openimaj/sandbox
Parallel.forEach(Arrays.asList(indir.listFiles()), new Operation<File>() {
代码示例来源:origin: org.openimaj/sandbox
if (d.isDirectory()) {
Parallel.forEach(Arrays.asList(d.listFiles()), new Operation<File>() {
@Override
public void perform(File f) {
代码示例来源:origin: openimaj/openimaj
if (d.isDirectory()) {
Parallel.forEach(Arrays.asList(d.listFiles()), new Operation<File>() {
@Override
public void perform(File f) {
代码示例来源:origin: openimaj/openimaj
final File outdir = new File("/Volumes/Raid/face_databases/lfw-centre-affine-pdsift-pca64-augm-fv512/");
Parallel.forEach(Arrays.asList(indir.listFiles()), new Operation<File>() {
@Override
public void perform(File dir) {
代码示例来源:origin: RS485/LogisticsPipes
.asList(Thread.currentThread().getStackTrace()));
traceList.removeFirst();
traceList.removeFirst();
代码示例来源:origin: org.openimaj/sandbox
final File outdir = new File("/Volumes/Raid/face_databases/lfw-centre-affine-pdsift-pca64-augm-fv512/");
Parallel.forEach(Arrays.asList(indir.listFiles()), new Operation<File>() {
@Override
public void perform(File dir) {
代码示例来源:origin: openimaj/openimaj
private static void createGif(String pathname, final String filepattern) throws IIOException, FileNotFoundException,
IOException
{
System.out.println("Creating " + pathname);
final File[] files = new File(pathname).listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
final String name = pathname.getName();
return name.startsWith(filepattern);
}
});
final List<File> flist = Arrays.asList(files);
final GifSequenceWriter gifWriter = GifSequenceWriter.createWriter(200, true, new File(pathname + "out.gif"));
File f;
for (int i = 0; i < files.length; i++) {
f = flist.get(i);
final MBFImage mbfImage = ImageUtilities.readMBF(f);
System.out.println("Writing frame!");
gifWriter.writeToSequence(mbfImage.process(new ResizeProcessor(640, 480)));
}
for (int i = files.length - 2; i > 0; i--) {
f = flist.get(i);
final MBFImage mbfImage = ImageUtilities.readMBF(f);
System.out.println("Writing frame!");
gifWriter.writeToSequence(mbfImage.process(new ResizeProcessor(640, 480)));
}
gifWriter.close();
}
}
代码示例来源:origin: org.openimaj/sandbox
private static void createGif(String pathname, final String filepattern) throws IIOException, FileNotFoundException,
IOException
{
System.out.println("Creating " + pathname);
final File[] files = new File(pathname).listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
final String name = pathname.getName();
return name.startsWith(filepattern);
}
});
final List<File> flist = Arrays.asList(files);
final GifSequenceWriter gifWriter = GifSequenceWriter.createWriter(200, true, new File(pathname + "out.gif"));
File f;
for (int i = 0; i < files.length; i++) {
f = flist.get(i);
final MBFImage mbfImage = ImageUtilities.readMBF(f);
System.out.println("Writing frame!");
gifWriter.writeToSequence(mbfImage.process(new ResizeProcessor(640, 480)));
}
for (int i = files.length - 2; i > 0; i--) {
f = flist.get(i);
final MBFImage mbfImage = ImageUtilities.readMBF(f);
System.out.println("Writing frame!");
gifWriter.writeToSequence(mbfImage.process(new ResizeProcessor(640, 480)));
}
gifWriter.close();
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishDeviceMod
@Override
public void renderOverlay(Laptop laptop, Minecraft mc, int mouseX, int mouseY, boolean windowActive)
{
if (this.visible)
{
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
int x = xPosition + (j * 18) - 1;
int y = yPosition + (i * 18) - 1;
if(GuiHelper.isMouseInside(mouseX, mouseY, x, y, x + 18, y + 18))
{
ItemStack stack = mc.player.inventory.getStackInSlot((i * 9) + j + 9);
if(!stack.isEmpty())
{
laptop.drawHoveringText(Arrays.asList(new String[]{stack.getDisplayName()}), mouseX, mouseY);
}
return;
}
}
}
}
}
代码示例来源:origin: apache/incubator-atlas
@Test
public void testGetTraitsNames() throws Exception {
HierarchicalTypeDefinition<TraitType> classificationTraitDefinition = TypesUtil
.createTraitTypeDef("Classification", ImmutableSet.<String>of(),
TypesUtil.createRequiredAttrDef("tag", DataTypes.STRING_TYPE));
HierarchicalTypeDefinition<TraitType> piiTrait =
TypesUtil.createTraitTypeDef("PII", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> phiTrait =
TypesUtil.createTraitTypeDef("PHI", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> pciTrait =
TypesUtil.createTraitTypeDef("PCI", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> soxTrait =
TypesUtil.createTraitTypeDef("SOX", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> secTrait =
TypesUtil.createTraitTypeDef("SEC", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> financeTrait =
TypesUtil.createTraitTypeDef("Finance", ImmutableSet.<String>of());
getTypeSystem().defineTypes(ImmutableList.<EnumTypeDefinition>of(),
ImmutableList.<StructTypeDefinition>of(),
ImmutableList.of(classificationTraitDefinition, piiTrait, phiTrait, pciTrait, soxTrait, secTrait,
financeTrait), ImmutableList.<HierarchicalTypeDefinition<ClassType>>of());
final ImmutableList<String> traitsNames = getTypeSystem().getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
Assert.assertEquals(traitsNames.size(), 7);
List traits = Arrays.asList(new String[]{"Classification", "PII", "PHI", "PCI", "SOX", "SEC", "Finance",});
Assert.assertFalse(Collections.disjoint(traitsNames, traits));
}
代码示例来源:origin: org.apache.atlas/atlas-typesystem
@Test
public void testGetTraitsNames() throws Exception {
HierarchicalTypeDefinition<TraitType> classificationTraitDefinition = TypesUtil
.createTraitTypeDef("Classification", ImmutableSet.<String>of(),
TypesUtil.createRequiredAttrDef("tag", DataTypes.STRING_TYPE));
HierarchicalTypeDefinition<TraitType> piiTrait =
TypesUtil.createTraitTypeDef("PII", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> phiTrait =
TypesUtil.createTraitTypeDef("PHI", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> pciTrait =
TypesUtil.createTraitTypeDef("PCI", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> soxTrait =
TypesUtil.createTraitTypeDef("SOX", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> secTrait =
TypesUtil.createTraitTypeDef("SEC", ImmutableSet.<String>of());
HierarchicalTypeDefinition<TraitType> financeTrait =
TypesUtil.createTraitTypeDef("Finance", ImmutableSet.<String>of());
getTypeSystem().defineTypes(ImmutableList.<EnumTypeDefinition>of(),
ImmutableList.<StructTypeDefinition>of(),
ImmutableList.of(classificationTraitDefinition, piiTrait, phiTrait, pciTrait, soxTrait, secTrait,
financeTrait), ImmutableList.<HierarchicalTypeDefinition<ClassType>>of());
final ImmutableList<String> traitsNames = getTypeSystem().getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
Assert.assertEquals(traitsNames.size(), 7);
List traits = Arrays.asList(new String[]{"Classification", "PII", "PHI", "PCI", "SOX", "SEC", "Finance",});
Assert.assertFalse(Collections.disjoint(traitsNames, traits));
}
代码示例来源:origin: ldtteam/minecolonies
when(colony2.getID()).thenReturn(2);
@SuppressWarnings("unchecked")
final List<Colony> colonyList = Arrays.asList(new Colony[] {colony1, colony2});
内容来源于网络,如有侵权,请联系作者删除!