Package it.unimi.dsi.fastutil.longs

Examples of it.unimi.dsi.fastutil.longs.LongArraySet


   
    @Test
    public void testKeySet() {
        assertTrue(emptySideChannel().keySet().isEmpty());
        assertTrue(emptyDomainSideChannel().keySet().isEmpty());
        LongSet expected = new LongArraySet(new long[]{1,2,4});
        assertEquals(expected, simpleSideChannel().keySet());
    }
View Full Code Here


   
    @Test
    public void testKeySet() {
        assertTrue(emptySideChannel().keySet().isEmpty());
        assertTrue(emptyDomainSideChannel().keySet().isEmpty());
        LongSet expected = new LongArraySet(new long[]{1,2,4});
        assertEquals(expected, simpleSideChannel().keySet());
    }
View Full Code Here

    valueSpecs1.put (1L, valueSpec[1]);
    valueSpecs1.put (2L, valueSpec[2]);
    final Map<Long, ValueSpecification> valueSpecs2 = new HashMap<Long, ValueSpecification> ();
    valueSpecs2.put (4L, valueSpec[4]);
    valueSpecs2.put (5L, valueSpec[5]);
    assertEquals(valueSpecs2, cachingSource.getValueSpecifications(new LongArraySet(new long[] {4L, 5L })));
    shouldFail.set(true);
    for (int i = 0; i < valueSpec.length; i++) {
      assertEquals((long)i, cachingSource.getIdentifier(valueSpec[i]));
      assertEquals((long)i, cachingSource.getIdentifier(valueSpec[i]));
      assertEquals (valueSpec[i], cachingSource.getValueSpecification (i));
      assertEquals (valueSpec[i], cachingSource.getValueSpecification (i));
    }
    assertEquals (identifiers1, cachingSource.getIdentifiers (Arrays.asList(valueSpec[1], valueSpec[2])));
    assertEquals (identifiers1, cachingSource.getIdentifiers (Arrays.asList(valueSpec[1], valueSpec[2])));
    assertEquals(valueSpecs1, cachingSource.getValueSpecifications(new LongArraySet(new long[] {1L, 2L })));
    assertEquals(valueSpecs1, cachingSource.getValueSpecifications(new LongArraySet(new long[] {1L, 2L })));
    assertEquals (identifiers2, cachingSource.getIdentifiers (Arrays.asList(valueSpec[3], valueSpec[4])));
    assertEquals (identifiers2, cachingSource.getIdentifiers (Arrays.asList(valueSpec[3], valueSpec[4])));
    assertEquals(valueSpecs2, cachingSource.getValueSpecifications(new LongArraySet(new long[] {4L, 5L })));
    assertEquals(valueSpecs2, cachingSource.getValueSpecifications(new LongArraySet(new long[] {4L, 5L })));
   
  }
View Full Code Here

TOP

Related Classes of it.unimi.dsi.fastutil.longs.LongArraySet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.