List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.zaradai.kunzite.trader.events.MarketData.java
public static MarketData newInstance(String instrumentId, DateTime timestamp, MarketDataField... elements) { return newInstance(instrumentId, timestamp, ImmutableList.copyOf(elements)); }
From source file:com.tngtech.archunit.library.dependencies.Cycle.java
Cycle(List<Edge<T, ATTACHMENT>> edges) {
this(new Path<>(ImmutableList.copyOf(edges)));
}
From source file:com.facebook.buck.core.cell.UnknownCellException.java
private static final ImmutableList<String> generateSuggestions(Optional<String> cellName, ImmutableSet<String> validCellNames) { if (!cellName.isPresent()) { return ImmutableList.of(); }// w ww .j a va 2 s . c o m List<String> suggestions = MoreStrings.getSpellingSuggestions(cellName.get(), validCellNames, 2); if (!suggestions.isEmpty()) { return ImmutableList.copyOf(suggestions); } return validCellNames.stream().sorted().collect(ImmutableList.toImmutableList()); }
From source file:com.facebook.presto.sql.tree.CoalesceExpression.java
public CoalesceExpression(Expression... operands) { this(Optional.empty(), ImmutableList.copyOf(operands)); }
From source file:hu.bme.mit.incqueryd.engine.rete.dataunits.Tuple.java
public Tuple(Object... tuple) { this.tuple = ImmutableList.copyOf(tuple); }
From source file:org.apache.calcite.sql.util.ChainedSqlOperatorTable.java
/** Creates a {@code ChainedSqlOperatorTable}. */ public static SqlOperatorTable of(SqlOperatorTable... tables) { return new ChainedSqlOperatorTable(ImmutableList.copyOf(tables)); }
From source file:org.eigenbase.relopt.RelOptPredicateList.java
public static RelOptPredicateList of(Iterable<RexNode> pulledUpPredicates) { ImmutableList<RexNode> pulledUpPredicatesList = ImmutableList.copyOf(pulledUpPredicates); if (pulledUpPredicatesList.isEmpty()) { return EMPTY; }/*w w w .j av a 2 s .c om*/ return new RelOptPredicateList(pulledUpPredicatesList, EMPTY_LIST, EMPTY_LIST); }
From source file:org.eclipse.mylyn.internal.wikitext.commonmark.inlines.InlineWithNestedContents.java
public InlineWithNestedContents(Line line, int offset, int length, List<Inline> contents) { super(line, offset, length); this.contents = ImmutableList.copyOf(contents); }
From source file:com.facebook.buck.shell.DefaultShellStep.java
public DefaultShellStep(List<String> args) { this.args = ImmutableList.copyOf(args); }
From source file:org.eclipse.xtext.resource.impl.ResourceDescriptionChangeEvent.java
/** * @since 2.5 */ public ResourceDescriptionChangeEvent(Iterable<IResourceDescription.Delta> delta) { this.delta = ImmutableList.copyOf(delta); }