List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.facebook.presto.block.BlockIterables.java
public static BlockIterable createBlockIterable(TupleInfo tupleInfo, Iterable<? extends Block> blocks) { return new StaticBlockIterable(tupleInfo, ImmutableList.copyOf(blocks)); }
From source file:org.opendaylight.yangtools.yang.model.util.type.BaseBitsType.java
BaseBitsType(final SchemaPath path, final List<UnknownSchemaNode> unknownSchemaNodes, final Collection<Bit> bits) { super(path, unknownSchemaNodes); this.bits = ImmutableList.copyOf(bits); }
From source file:com.techshroom.mods.craftorio.block.ExtendedBlock.java
public static List<ExtendedBlock> getRegisteredBlocks() { return ImmutableList.copyOf(registeredBlocks); }
From source file:org.jclouds.softlayer.domain.Network.java
@SerializedNames({ "accountId", "id", "cidr", "networkIdentifier", "name", "notes", "subnets" }) public static Network create(long accountId, long id, int cidr, String networkIdentifier, String name, String notes, List<Subnet> subnets) { return new AutoValue_Network(accountId, id, cidr, networkIdentifier, name, notes, subnets == null ? ImmutableList.<Subnet>of() : ImmutableList.copyOf(subnets)); }
From source file:org.jclouds.azurecompute.domain.ComputeCapabilities.java
public static ComputeCapabilities create(final List<RoleSize.Type> virtualMachineRoleSizes, final List<RoleSize.Type> webWorkerRoleSizes) { return new AutoValue_ComputeCapabilities(ImmutableList.copyOf(virtualMachineRoleSizes), ImmutableList.copyOf(webWorkerRoleSizes)); }
From source file:io.prestosql.plugin.raptor.legacy.storage.InMemoryShardRecorder.java
public List<RecordedShard> getShards() { return ImmutableList.copyOf(shards); }
From source file:com.hippo.preferences.AndroidPreferencesExtension.java
public List<Preference> getPreferences() { return ImmutableList.copyOf(preferences); }
From source file:com.skelril.nitro.droptable.DropTableImpl.java
public DropTableImpl(DiceRoller roller, List<DropTableEntry> possible) { this.roller = roller; // First sort possible, then apply possible.sort((a, b) -> a.getChance() - b.getChance()); Validate.isTrue(!possible.isEmpty() && possible.get(0).getChance() > 0); this.possible = ImmutableList.copyOf(possible); }
From source file:com.google.errorprone.bugpatterns.argumentselectiondefects.InvocationInfo.java
static InvocationInfo createFromNewClass(NewClassTree tree, MethodSymbol symbol, VisitorState state) { return new AutoValue_InvocationInfo(tree, symbol, ImmutableList.copyOf(tree.getArguments()), getFormalParametersWithoutVarArgs(symbol), state); }
From source file:org.lanternpowered.api.script.function.condition.Condition.java
static OrCondition or(Iterable<Condition> conditions) { return new OrCondition(ImmutableList.copyOf(conditions)); }