示例#1
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));
 }
示例#2
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));
 }
示例#3
1
 /**
  * Creates a Vector of long numbers starting from {@code from}, extending to {@code toExclusive -
  * 1}.
  *
  * <p>Examples:
  *
  * <pre>
  * <code>
  * Vector.range(0L, 0L)  // = Vector()
  * Vector.range(2L, 0L)  // = Vector()
  * Vector.range(-2L, 2L) // = Vector(-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 Vector<Long> range(long from, long toExclusive) {
   return Vector.ofAll(Iterator.range(from, toExclusive));
 }
示例#4
1
 public static Array<Character> range(char from, char toExclusive) {
   return ofAll(Iterator.range(from, toExclusive));
 }
示例#5
1
 /**
  * Creates a Vector of int numbers starting from {@code from}, extending to {@code toExclusive -
  * 1}.
  *
  * <p>Examples:
  *
  * <pre>
  * <code>
  * Vector.range(0, 0)  // = Vector()
  * Vector.range(2, 0)  // = Vector()
  * Vector.range(-2, 2) // = Vector(-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 Vector<Integer> range(int from, int toExclusive) {
   return Vector.ofAll(Iterator.range(from, toExclusive));
 }