Esempio n. 1
1
 /**
  * Creates a Array of int numbers starting from {@code from}, extending to {@code toExclusive -
  * 1}.
  *
  * <p>Examples:
  *
  * <pre>
  * <code>
  * Array.range(0, 0)  // = Array()
  * Array.range(2, 0)  // = Array()
  * Array.range(-2, 2) // = Array(-2, -1, 0, 1)
  * </code>
  * </pre>
  *
  * @param from the first number
  * @param toExclusive the last number + 1
  * @return a range of int values as specified or the empty range if {@code from >= toExclusive}
  */
 public static Array<Integer> range(int from, int toExclusive) {
   return ofAll(Iterator.range(from, toExclusive));
 }
Esempio n. 2
1
 /**
  * Creates a Array of long numbers starting from {@code from}, extending to {@code toExclusive -
  * 1}.
  *
  * <p>Examples:
  *
  * <pre>
  * <code>
  * Array.range(0L, 0L)  // = Array()
  * Array.range(2L, 0L)  // = Array()
  * Array.range(-2L, 2L) // = Array(-2L, -1L, 0L, 1L)
  * </code>
  * </pre>
  *
  * @param from the first number
  * @param toExclusive the last number + 1
  * @return a range of long values as specified or the empty range if {@code from >= toExclusive}
  */
 public static Array<Long> range(long from, long toExclusive) {
   return ofAll(Iterator.range(from, toExclusive));
 }
Esempio n. 3
1
 public static Array<Character> range(char from, char toExclusive) {
   return ofAll(Iterator.range(from, toExclusive));
 }