/** * Creates a {@link DataPoint}. This method uses {@link JsArrayUtils#readOnlyJsArray(double[])} so be careful of the differences between dev and production mode. * * @param array source array * * @return JS array, which may be a copy or an alias of the input array */ public static DataPoint of( double... array ) { return JsArrayUtils.readOnlyJsArray( array ).cast(); }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Double> fromDoubles(final double... args) { Array<Double> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Float> fromFloats(final float... args) { Array<Float> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Double> fromDoubles(final double... args) { Array<Double> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Long> fromLongs(final long... args) { Array<Long> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Float> fromFloats(final float... args) { Array<Float> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }
/** * Create a new Array from the given values. * * @param args * the values * @return the new array */ public static final Array<Long> fromLongs(final long... args) { Array<Long> a = JsArrayUtils.readOnlyJsArray(args).cast(); replaceArrayToString(a); return a; }