List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.madvay.tools.android.perf.common.RowAdapter.java
protected RowAdapter(List<String> columns, List<CoerceType> types) { this.columns = ImmutableList.copyOf(columns); this.types = ImmutableList.copyOf(types); }
From source file:org.opendaylight.yangtools.yang.model.util.type.BaseUnionType.java
BaseUnionType(final SchemaPath path, final List<UnknownSchemaNode> unknownSchemaNodes, final Collection<TypeDefinition<?>> types) { super(path, unknownSchemaNodes); this.types = ImmutableList.copyOf(types); }
From source file:br.com.objectos.office.core.ProcessManagerFake.java
private static List<String> args(String... args) { return ImmutableList.copyOf(args); }
From source file:org.jclouds.docker.internal.NullSafeCopies.java
/** * Copies given List with keeping null value if provided. * * @param list//from www. ja va2 s . c o m * instance to copy (maybe <code>null</code>) * @return if the parameter is not-<code>null</code> then immutable copy; * <code>null</code> otherwise */ public static <E> List<E> copyWithNullOf(@Nullable List<E> list) { return list != null ? ImmutableList.copyOf(list) : null; }
From source file:io.airlift.airline.ParseCommandUnrecognizedException.java
ParseCommandUnrecognizedException(List<String> unparsedInput) { super("Command '%s' not recognized", unparsedInput.get(0)); this.unparsedInput = ImmutableList.copyOf(unparsedInput); }
From source file:de.ph1b.audiobook.testing.DummyCreator.java
public static Book dummyBook(File file1, File file2, long id) { List<Bookmark> bookmarks = new ArrayList<>(); Book.Type type = Book.Type.SINGLE_FOLDER; String author = "TestAuthor"; int time = 0; String name = "TestBook"; Chapter chapter1 = new Chapter(file1, file1.getName(), 1 + rnd.nextInt(100000)); Chapter chapter2 = new Chapter(file2, file2.getName(), 1 + rnd.nextInt(200000)); List<Chapter> chapters = Lists.newArrayList(chapter1, chapter2); float playbackSpeed = 1F; String root = file1.getParent(); if (root == null) { root = "fakeRoot"; }/*from w ww . j a va 2 s . c om*/ return new Book(id, ImmutableList.copyOf(bookmarks), type, false, author, file1, time, name, ImmutableList.copyOf(chapters), playbackSpeed, root); }
From source file:com.greensopinion.finance.services.domain.Categories.java
public Categories(List<Category> categories) { this.categories = ImmutableList.copyOf(categories); }
From source file:org.kurento.orion.entities.ContextUpdateResponse.java
public ContextUpdateResponse(OrionContextElementResponse... contextElements) { this.contextElements = ImmutableList.copyOf(contextElements); }
From source file:com.opengamma.strata.calc.config.CompositeMarketDataRules.java
/** * Obtains an instance based on the specified rule sets. * //from ww w . ja v a2s . c o m * @param rules the rule sets to combine * @return the combined rule sets */ public static CompositeMarketDataRules of(MarketDataRules... rules) { return new CompositeMarketDataRules(ImmutableList.copyOf(rules)); }
From source file:com.yahoo.yqlplus.engine.internal.bytecode.types.gambit.BytecodeInvocable.java
BytecodeInvocable(TypeWidget returnType, List<TypeWidget> argTypes) { this.returnType = returnType; this.argTypes = ImmutableList.copyOf(argTypes); }