Example usage for org.apache.commons.collections4.keyvalue MultiKey MultiKey

List of usage examples for org.apache.commons.collections4.keyvalue MultiKey MultiKey

Introduction

In this page you can find the example usage for org.apache.commons.collections4.keyvalue MultiKey MultiKey.

Prototype

@SuppressWarnings("unchecked")
public MultiKey(final K key1, final K key2, final K key3) 

Source Link

Document

Constructor taking three keys.

Usage

From source file:channellistmaker.dataextractor.channel.ChannelDataExtractorTest.java

@Test
public void testSomeMethod0() {
    LOG.info("");
    Channel exp = new Channel(25, "ja_JP", "", "GR_1040", 32738, 32738, 1040);

    final Document doc = new XMLLoader(Charset.forName("UTF-8")).Load(new File("./test/25.xml"));
    ChannelDataExtractor ex = new ChannelDataExtractor(doc);
    Map<MultiKey<Integer>, Channel> dest = ex.makeMap();
    Channel c = dest.get(new MultiKey<Integer>(32738, 32738, 1040));
    if (c != null) {
        LOG.info(c);/*from   ww  w  .j  a  v  a  2  s . c o  m*/
        assertEquals(c, exp);
    } else {
        fail("??");
    }
}

From source file:epgtools.dumpepgfromts.dataextractor.KeyFields.java

/**
 * ??????Map????// ww  w  .j  av a 2  s.  c  o m
 *
 * @see java.util.Map
 * @return ?
 */
public final MultiKey<Integer> getMuiltiKey() {
    return new MultiKey<>(this.getTransport_stream_id(), this.getOriginal_network_id(), this.getService_id());
}

From source file:channellistmaker.dataextractor.KeyFields.java

/**
 * ??????Map????/* w ww .j  av  a2  s .  c om*/
 * @see java.util.Map
 * @return ?
 */
public final synchronized MultiKey<Integer> getMuiltiKey() {
    return new MultiKey<>(this.getTransportStreamId(), this.getOriginalNetworkId(), this.getServiceId());
}

From source file:epgtools.dumpepgfromts.dataextractor.KeyFieldsTest.java

/**
 * Test of getMuiltiKey method, of class KeyFields.
 *//* ww  w  .ja v  a2s  . c  om*/
@Test
public void testGetMuiltiKey() {
    LOG.info("getMuiltiKey");
    KeyFields instance = KEY_1;
    MultiKey<Integer> expResult = new MultiKey<>(1, 1, 2);
    MultiKey<Integer> result = instance.getMuiltiKey();
    assertEquals(expResult, result);
}

From source file:channellistmaker.dataextractor.KeyFieldsTest.java

/**
 * Test of getMuiltiKey method, of class KeyFields.
 *///www  .j a  v a2s.  c om
@Test
public void testGetMuiltiKey() {
    System.out.println("getMuiltiKey");
    KeyFields instance = target1;
    MultiKey<Integer> expResult = new MultiKey<>(0, 1, 2);
    MultiKey<Integer> result = instance.getMuiltiKey();
    assertEquals(expResult, result);
}

From source file:com.hubrick.vertx.rest.impl.DefaultRestClientRequest.java

private MultiKey createCacheKey(String uri, MultiMap headers, byte[] body) {
    return new MultiKey(uri, headers.entries().stream().map(e -> e.getKey() + ": " + e.getValue()).sorted()
            .collect(Collectors.toList()), Arrays.hashCode(body));
}