Java Code Examples for com.google.common.collect.ImmutableList#of()
The following examples show how to use
com.google.common.collect.ImmutableList#of() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExopackageInstallerIntegrationTest.java From buck with Apache License 2.0 | 6 votes |
@Test public void testExoNativeInstall() throws Exception { currentBuildState = new ExoState( "apk-content\n", createFakeManifest("manifest-content\n"), ImmutableList.of(), ImmutableSortedMap.of( "libs/" + SdkConstants.ABI_INTEL_ATOM + "/libone.so", "x86-libone\n", "libs/" + SdkConstants.ABI_INTEL_ATOM + "/libtwo.so", "x86-libtwo\n", "libs/" + SdkConstants.ABI_ARMEABI_V7A + "/libone.so", "armv7-libone\n", "libs/" + SdkConstants.ABI_ARMEABI_V7A + "/libtwo.so", "armv7-libtwo\n"), ImmutableList.of(), ImmutableList.of()); checkExoInstall(1, 0, 2, 0, 0); // This should be checked already, but do it explicitly here too to make it clear // that we actually verify that the correct architecture libs are installed. assertTrue(devicePathExists("native-libs/armeabi-v7a/metadata.txt")); assertFalse(devicePathExists("native-libs/x86/metadata.txt")); }
Example 2
Source File: RealAverageAggregation.java From presto with Apache License 2.0 | 6 votes |
protected RealAverageAggregation() { super( new FunctionMetadata( new Signature( NAME, ImmutableList.of(), ImmutableList.of(), REAL.getTypeSignature(), ImmutableList.of(REAL.getTypeSignature()), false), true, ImmutableList.of(new FunctionArgumentDefinition(false)), false, true, "Returns the average value of the argument", AGGREGATE), true, false); }
Example 3
Source File: ElasticsearchDomainTest.java From batfish with Apache License 2.0 | 6 votes |
public Map<String, Configuration> loadAwsConfigurations() throws IOException { List<String> awsFilenames = ImmutableList.of( "ElasticsearchDomains.json", "SecurityGroups.json", "Subnets.json", "Vpcs.json", "NetworkAcls.json", "NetworkInterfaces.json", "Reservations.json"); Batfish batfish = BatfishTestUtils.getBatfishFromTestrigText( TestrigText.builder() .setAwsFiles("org/batfish/representation/aws/test", awsFilenames) .build(), _folder); return batfish.loadConfigurations(batfish.getSnapshot()); }
Example 4
Source File: RowIndeterminateOperator.java From presto with Apache License 2.0 | 5 votes |
private RowIndeterminateOperator() { super(INDETERMINATE, ImmutableList.of(withVariadicBound("T", "row")), ImmutableList.of(), BOOLEAN.getTypeSignature(), ImmutableList.of(new TypeSignature("T")), false); }
Example 5
Source File: SourceDirectoryCalculatorTest.java From intellij with Apache License 2.0 | 5 votes |
@Test public void testCompetingPackageDeclarationWithEqualCountsPicksDefault() { mockInputStreamProvider .addFile( "/root/java/com/google/Bla.java", "package com.google.different;\n public class Bla {}") .addFile("/root/java/com/google/Foo.java", "package com.google;\n public class Foo {}"); List<SourceArtifact> sourceArtifacts = ImmutableList.of( SourceArtifact.builder(TargetKey.forPlainTarget(LABEL)) .setArtifactLocation( ArtifactLocation.builder() .setRelativePath("java/com/google/Foo.java") .setIsSource(true)) .build(), SourceArtifact.builder(TargetKey.forPlainTarget(LABEL)) .setArtifactLocation( ArtifactLocation.builder() .setRelativePath("java/com/google/Bla.java") .setIsSource(true)) .build()); ImmutableList<BlazeContentEntry> result = sourceDirectoryCalculator.calculateContentEntries( project, context, workspaceRoot, decoder, buildImportRoots( ImmutableList.of(new WorkspacePath("java/com/google")), ImmutableList.of()), sourceArtifacts, NO_MANIFESTS); issues.assertNoIssues(); assertThat(result) .containsExactly( BlazeContentEntry.builder("/root/java/com/google") .addSource( BlazeSourceDirectory.builder("/root/java/com/google") .setPackagePrefix("com.google") .build()) .build()); }
Example 6
Source File: RelOptTableImpl.java From Bats with Apache License 2.0 | 5 votes |
@Override public List<RelReferentialConstraint> getReferentialConstraints() { if (table != null) { return table.getStatistic().getReferentialConstraints(); } return ImmutableList.of(); }
Example 7
Source File: SearchTermViewServiceStubSettings.java From google-ads-java with Apache License 2.0 | 5 votes |
protected Builder(SearchTermViewServiceStubSettings settings) { super(settings); getSearchTermViewSettings = settings.getSearchTermViewSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(getSearchTermViewSettings); }
Example 8
Source File: HorizontalVelocityWithUncertainty.java From supl-client with Apache License 2.0 | 5 votes |
public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_horizontalSpeedType != null) { return ImmutableList.of(TAG_horizontalSpeedType); } else { return Asn1Integer.getPossibleFirstTags(); } }
Example 9
Source File: ByonLocationResolverTest.java From brooklyn-server with Apache License 2.0 | 5 votes |
@Test public void testMachinesObtainedInOrder() throws Exception { List<String> ips = ImmutableList.of("1.1.1.1", "1.1.1.6", "1.1.1.3", "1.1.1.4", "1.1.1.5"); String spec = "byon(hosts=\""+Joiner.on(",").join(ips)+"\")"; MachineProvisioningLocation<MachineLocation> ll = resolve(spec); for (String expected : ips) { MachineLocation obtained = ll.obtain(ImmutableMap.of()); assertEquals(obtained.getAddress().getHostAddress(), expected); } }
Example 10
Source File: Rel7_MsrPosition_Req_Extension.java From supl-client with Apache License 2.0 | 5 votes |
public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_velocityRequestedType != null) { return ImmutableList.of(TAG_velocityRequestedType); } else { return Asn1Null.getPossibleFirstTags(); } }
Example 11
Source File: GroupPlacementViewServiceStubSettings.java From google-ads-java with Apache License 2.0 | 5 votes |
protected Builder(GroupPlacementViewServiceStubSettings settings) { super(settings); getGroupPlacementViewSettings = settings.getGroupPlacementViewSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(getGroupPlacementViewSettings); }
Example 12
Source File: BT_MeasurementElement_r13.java From supl-client with Apache License 2.0 | 5 votes |
public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_BT_MeasurementElement_r13 != null) { return ImmutableList.of(TAG_BT_MeasurementElement_r13); } else { return Asn1Sequence.getPossibleFirstTags(); } }
Example 13
Source File: ReferenceTime.java From supl-client with Apache License 2.0 | 5 votes |
public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_ReferenceTime != null) { return ImmutableList.of(TAG_ReferenceTime); } else { return Asn1Sequence.getPossibleFirstTags(); } }
Example 14
Source File: JsonConfiguratorTest.java From druid-api with Apache License 2.0 | 5 votes |
@JsonCreator protected MappableObject( @JsonProperty("prop1") final String prop1, @JsonProperty("prop1List") final List<String> prop1List ) { this.prop1 = prop1; this.prop1List = prop1List == null ? ImmutableList.<String>of() : prop1List; }
Example 15
Source File: TestEffectivePredicateExtractor.java From presto with Apache License 2.0 | 5 votes |
@Test public void testInnerJoinPropagatesPredicatesViaEquiConditions() { Map<Symbol, ColumnHandle> leftAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(A, B, C))); TableScanNode leftScan = tableScanNode(leftAssignments); Map<Symbol, ColumnHandle> rightAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(D, E, F))); TableScanNode rightScan = tableScanNode(rightAssignments); FilterNode left = filter(leftScan, equals(AE, bigintLiteral(10))); // predicates on "a" column should be propagated to output symbols via join equi conditions PlanNode node = new JoinNode( newId(), JoinNode.Type.INNER, left, rightScan, ImmutableList.of(new JoinNode.EquiJoinClause(A, D)), ImmutableList.of(), rightScan.getOutputSymbols(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ImmutableMap.of(), Optional.empty()); Expression effectivePredicate = effectivePredicateExtractor.extract(SESSION, node, TypeProvider.empty(), typeAnalyzer); assertEquals( normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(DE, bigintLiteral(10)))); }
Example 16
Source File: WindowsMl64Compiler.java From buck with Apache License 2.0 | 4 votes |
@Override public ImmutableList<String> outputDependenciesArgs(String outputPath) { return ImmutableList.of(); }
Example 17
Source File: CoreRules.java From bazel with Apache License 2.0 | 4 votes |
@Override public ImmutableList<RuleSet> requires() { return ImmutableList.of(); }
Example 18
Source File: BlazeInstrumentationTestApkBuildStepIntegrationTest.java From intellij with Apache License 2.0 | 4 votes |
@Test public void noTestAppSpecified() { setProjectView( "directories:", " java/com/foo/app", "targets:", " //java/com/foo/app:instrumentation_test", "android_sdk_platform: android-27"); MockSdkUtil.registerSdk(workspace, "27"); workspace.createFile( new WorkspacePath("java/com/foo/app/MainActivity.java"), "package com.foo.app", "import android.app.Activity;", "public class MainActivity extends Activity {}"); workspace.createFile( new WorkspacePath("java/com/foo/app/Test.java"), "package com.foo.app", "public class Test {}"); setTargetMap( android_binary("//java/com/foo/app:app").src("MainActivity.java"), android_binary("//java/com/foo/app:test_app") .src("Test.java") .instruments("//java/com/foo/app:app"), android_instrumentation_test("//java/com/foo/app:instrumentation_test")); runFullBlazeSync(); MessageCollector messageCollector = new MessageCollector(); BlazeContext context = new BlazeContext(); context.addOutputSink(IssueOutput.class, messageCollector); BlazeInstrumentationTestApkBuildStep buildStep = new BlazeInstrumentationTestApkBuildStep( getProject(), Label.create("//java/com/foo/app:instrumentation_test"), ImmutableList.of()); InstrumentorToTarget pair = buildStep.getInstrumentorToTargetPair( context, BlazeProjectDataManager.getInstance(getProject()).getBlazeProjectData()); assertThat(pair).isNull(); assertThat(messageCollector.getMessages()).hasSize(1); assertThat(messageCollector.getMessages().get(0)) .contains( "No \"test_app\" in target definition for //java/com/foo/app:instrumentation_test."); }
Example 19
Source File: TestSDCClassloader.java From datacollector with Apache License 2.0 | 4 votes |
@Test(expected = ExceptionInInitializerError.class) public void testBringMultipleStageLibsToFront() throws Exception { List<URL> urls = ImmutableList.of(new URL("file:///tmp/bar-1.jar"), new URL("file:///tmp/bar-X-1.jar")); Assert.assertEquals(urls, SDCClassLoader.bringStageAndProtoLibsToFront("bar", urls)); }
Example 20
Source File: BackendKeyUtils.java From heroic with Apache License 2.0 | 4 votes |
SchemaBoundStatement gteToken(final BackendKeyFilter.GTEToken clause) { return new SchemaBoundStatement(columnToken + " >= ?", ImmutableList.of(clause.getToken())); }