List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:mod.steamnsteel.crafting.IngotRecipes.java
private static List<IRecipe> getRecipes() { final List<IRecipe> recipes = Lists.newArrayList(); recipes.add(assembleRecipe(ModBlock.blockBrass, ModItem.Names.BRASS_INGOT)); recipes.add(assembleRecipe(ModBlock.blockBronze, ModItem.Names.BRONZE_INGOT)); recipes.add(assembleRecipe(ModBlock.blockCopper, ModItem.Names.COPPER_INGOT)); recipes.add(assembleRecipe(ModBlock.blockPlotonium, ModItem.Names.PLOTONIUM_INGOT)); recipes.add(assembleRecipe(ModBlock.blockSteel, ModItem.Names.STEEL_INGOT)); recipes.add(assembleRecipe(ModBlock.blockTin, ModItem.Names.TIN_INGOT)); recipes.add(assembleRecipe(ModBlock.blockZinc, ModItem.Names.ZINC_INGOT)); return ImmutableList.copyOf(recipes); }
From source file:com.google.errorprone.refaster.UClassDecl.java
public static UClassDecl create(Iterable<UMethodDecl> members) { return new AutoValue_UClassDecl(ImmutableList.copyOf(members)); }
From source file:com.facebook.swift.parser.model.ConstList.java
public ConstList(List<ConstValue> value) { this.value = ImmutableList.copyOf(checkNotNull(value, "value")); }
From source file:com.mysema.query.types.template.BooleanTemplate.java
public static BooleanExpression create(String template, Object... args) { return new BooleanTemplate(TemplateFactory.DEFAULT.create(template), ImmutableList.copyOf(args)); }
From source file:io.prestosql.sql.planner.optimizations.LocalProperties.java
public static <T> List<LocalProperty<T>> stripLeadingConstants(List<? extends LocalProperty<T>> properties) { PeekingIterator<? extends LocalProperty<T>> iterator = peekingIterator(properties.iterator()); while (iterator.hasNext() && iterator.peek() instanceof ConstantProperty) { iterator.next();/* w w w. ja v a 2 s . c o m*/ } return ImmutableList.copyOf(iterator); }
From source file:com.wrmsr.neurosis.util.FileUtils.java
public static ImmutableList<File> listFiles(File dir) { File[] files = dir.listFiles(); if (files == null) { return ImmutableList.of(); }//www. j a va2s. c o m return ImmutableList.copyOf(files); }
From source file:com.wrmsr.wava.yen.parser.element.ListElement.java
public ListElement(List<Element> list) { this.list = ImmutableList.copyOf(list); }
From source file:com.facebook.buck.io.FakeExecutableFinder.java
public FakeExecutableFinder(Path... knownPaths) { this(ImmutableList.copyOf(knownPaths)); }
From source file:io.prestosql.plugin.mongodb.MongoQueryRunner.java
public static MongoQueryRunner createMongoQueryRunner(TpchTable<?>... tables) throws Exception { return createMongoQueryRunner(ImmutableList.copyOf(tables)); }
From source file:com.teradata.benchto.driver.loader.SqlStatementGenerator.java
private static ImmutableList<String> toSqlQueries(String sqlTemplate) { return ImmutableList.copyOf(SQL_STATEMENT_SPLITTER.split(sqlTemplate)); }