private static double[] collectDomain(NonBlockingHashMapLong ls) {
    int sz = ls.size();         // Uniques
    double ds[] = new double[sz];
    int x = 0;
    for (NonBlockingHashMapLong.IteratorLong i = iter(ls); i.hasNext(); )
      ds[x++] = Double.longBitsToDouble(i.nextLong());
    Arrays.sort(ds);
    return ds;
  }
private static double [ ] collectDomain ( NonBlockingHashMapLong ls ) { int sz = ls . size ( ) ; double ds [ ] = new double [ sz ] ; int x = 0 ; for ( NonBlockingHashMapLong . IteratorLong i = iter ( ls ) ; i . hasNext ( ) ; ) ds [ x ++ ] = Double . longBitsToDouble ( i . nextLong ( ) ) ; Arrays . sort ( ds ) ; return ds ; }
them as a sorted double[].