private static List nonZeroLongArrayToList()

in src/main/java/com/uber/h3core/H3Core.java [1174:1187]


  private static List<Long> nonZeroLongArrayToList(long[] out) {
    // Allocate for the case that we need to copy everything from
    // the `out` array.
    List<Long> ret = new ArrayList<>(out.length);

    for (int i = 0; i < out.length; i++) {
      long h = out[i];
      if (h != 0) {
        ret.add(h);
      }
    }

    return ret;
  }