Example usage for com.google.common.collect ImmutableSortedMap of

List of usage examples for com.google.common.collect ImmutableSortedMap of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSortedMap of.

Prototype

public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2) 

Source Link

Usage

From source file:com.noodlewiz.xjavab.core.ValueParam.java

/**
 * Returns a ValueParam containing the given entries, in order.
 *///from   w  w  w .  j av a  2 s  .  c  o m
public ValueParam(final long k1, final long v1, final long k2, final long v2) {
    mMap = ImmutableSortedMap.of(k1, v1, k2, v2);
}

From source file:com.facebook.buck.rules.modern.builders.RemoteExecution.java

private ImmutableSortedMap<String, String> getBuilderEnvironmentOverrides(
        ImmutableList<Path> bootstrapClasspath, Iterable<Path> classpath) {
    return ImmutableSortedMap.of("CLASSPATH", classpathArg(bootstrapClasspath), "BUCK_CLASSPATH",
            classpathArg(classpath));/*from w  w  w  . j a  va  2s  .c  o m*/
}

From source file:com.google.cloud.dns.testing.LocalDnsHelper.java

/**
 * Prepares record sets that are created by default for each zone.
 *//*from  w  w  w .  j av  a2s  .co  m*/
private static ImmutableSortedMap<String, ResourceRecordSet> defaultRecords(ManagedZone zone) {
    ResourceRecordSet soa = new ResourceRecordSet();
    soa.setTtl(21600);
    soa.setName(zone.getDnsName());
    soa.setRrdatas(ImmutableList.of(
            // taken from the service
            "ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 0 21600 3600 1209600 312"));
    soa.setType("SOA");
    ResourceRecordSet ns = new ResourceRecordSet();
    ns.setTtl(21600);
    ns.setName(zone.getDnsName());
    ns.setRrdatas(zone.getNameServers());
    ns.setType("NS");
    String nsId = getUniqueId(ImmutableSet.<String>of());
    String soaId = getUniqueId(ImmutableSet.of(nsId));
    return ImmutableSortedMap.of(nsId, ns, soaId, soa);
}