Examples of toArray()


Examples of org.apache.lucene.facet.collections.IntHashSet.toArray()

          set.add(value);
        } else {
          set.remove(value);
        }
      }
      int[] vals = set.toArray();
      assertEquals(set.size(), vals.length);

      int[] realValues = new int[set.size()];
      int[] unrealValues = set.toArray(realValues);
      assertEquals(realValues, unrealValues);
View Full Code Here

Examples of org.apache.lucene.facet.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

Examples of org.apache.lucene.facet.collections.IntToFloatMap.toArray()

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

Examples of org.apache.lucene.facet.collections.IntToIntMap.toArray()

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

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

          set.add(value);
        } else {
          set.remove(value);
        }
      }
      int[] vals = set.toArray();
      assertEquals(set.size(), vals.length);

      int[] realValues = new int[set.size()];
      int[] unrealValues = set.toArray(realValues);
      assertEquals(realValues, unrealValues);
View Full Code Here

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

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

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

Examples of org.apache.mahout.cf.taste.impl.common.FastIDSet.toArray()

          neighborhood.add(otherUserID);
        }
      }
    }
   
    return neighborhood.toArray();
  }
 
  @Override
  public String toString() {
    return "ThresholdUserNeighborhood";
View Full Code Here

Examples of org.apache.mahout.math.list.CharArrayList.toArray()

                keys.add(element);
                return true;
            }
        });

        char[] keysArray = keys.toArray(new char[keys.size()]);
        Arrays.sort(keysArray);

        assertArrayEquals(new char[] {11, 12, 14}, keysArray /* keyEpsilon */);
    }

View Full Code Here

Examples of org.apache.pivot.collections.Sequence.Tree.Path.toArray()

                    if (!Sequence.Tree.isDescendant(basePath, affectedPath)) {
                        // All paths from here forward are guaranteed to be unaffected
                        break;
                    }

                    Integer[] elements = affectedPath.toArray();
                    elements[depth]++;
                    paths.update(i, new ImmutablePath(elements));
                }
            } finally {
                // Restore the comparator
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.