Package org.apache.lucene.util.collections

Examples of org.apache.lucene.util.collections.IntToDoubleMap.toArray()


    HashSet<Double> valueSet = new HashSet<Double>();
    for (DoubleIterator iit = map.iterator(); iit.hasNext(); ) {
      valueSet.add(iit.next());
    }
    assertEquals(length, valueSet.size());
    double[] array = map.toArray();
    assertEquals(length, array.length);
    for (double value: array) {
      assertTrue(valueSet.contains(value));
    }
   
View Full Code Here


    for (double value: array) {
      assertTrue(valueSet.contains(value));
    }
   
    double[] array2 = new double[80];
    array2 = map.toArray(array2);
    assertEquals(length, array2.length);
    for (double value: array2) {
      assertTrue(valueSet.contains(value));
    }
   
View Full Code Here

    for (double value: array2) {
      assertTrue(valueSet.contains(value));
    }
   
    double[] array3 = new double[120];
    array3 = map.toArray(array3);
    for (int i = 0 ;i < length; ++i) {
      assertTrue(valueSet.contains(array3[i]));
    }
   
    for (int i = 0; i < length; ++i) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.