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