List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.facebook.swift.parser.model.StringEnum.java
public StringEnum(String name, List<String> values) { this.name = checkNotNull(name, "name"); this.values = ImmutableList.copyOf(checkNotNull(values, "values")); }
From source file:org.mule.registry.SpiServiceRegistry.java
/** * If {@code classLoader} is {@code null}, then the current {@link Thread#getContextClassLoader()} * will be used/*from w w w. j a va2 s. c o m*/ * {@inheritDoc} */ @Override public <T> Collection<T> lookupProviders(Class<T> providerClass, ClassLoader classLoader) { if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); } return ImmutableList.copyOf(ServiceLoader.load(providerClass, classLoader).iterator()); }
From source file:org.lanternpowered.api.script.function.action.Action.java
static MultiAction multi(Iterable<Action> actions) { return new MultiAction(ImmutableList.copyOf(actions)); }
From source file:com.yahoo.yqlplus.api.types.YQLUnionType.java
YQLUnionType(Annotations annotations, List<YQLType> types) { super(annotations, YQLCoreType.UNION, createName(types)); this.choices = ImmutableList.copyOf(types); }
From source file:com.wrmsr.wava.java.lang.JTypeSpecifier.java
public JTypeSpecifier(JQualifiedName name, List<JArray> arrays) { this.name = requireNonNull(name); this.arrays = ImmutableList.copyOf(arrays); }
From source file:org.opendaylight.yangtools.yang.model.util.type.BaseEnumerationType.java
BaseEnumerationType(final SchemaPath path, final List<UnknownSchemaNode> unknownSchemaNodes, final Collection<EnumPair> values) { super(path, unknownSchemaNodes); this.values = ImmutableList.copyOf(values); }
From source file:co.cask.cdap.data.file.filter.AndReadFilter.java
public AndReadFilter(ReadFilter... filters) { this.filters = ImmutableList.copyOf(filters); }
From source file:uk.co.danielrendall.metaphor.records.RULER.java
public RULER(TabStop[] tabStops) { this.tabStops = ImmutableList.copyOf(tabStops); }
From source file:com.sk89q.intake.argument.Arguments.java
/** * Create an argument stack from a list of string arguments using * an empty namespace./*from www . j av a 2 s . c o m*/ * * @param arguments The array of string arguments * @return The arguments */ public static CommandArgs of(String... arguments) { return copyOf(ImmutableList.copyOf(arguments)); }
From source file:com.facebook.presto.mysql.MySQLTable.java
public MySQLTable(MySQLTableHandle tableHandle, List<MySQLColumnHandle> columns) { this.tableHandle = tableHandle; this.columns = ImmutableList.copyOf(columns); int count = 0; while (count < columns.size() && columns.get(count).isPartitionKey()) { count++;/* w ww .j ava 2s . c o m*/ } partitionKeyColumns = count; }