From: Arne V. <cob...@us...> - 2005-01-23 20:31:34
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26216/org/jrobin/core Modified Files: FetchData.java RrdDataSet.java Util.java Log Message: JRobin 2.0 - Additions and related changes Index: FetchData.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/FetchData.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** FetchData.java 16 Dec 2004 11:16:01 -0000 1.17 --- FetchData.java 23 Jan 2005 20:31:24 -0000 1.18 *************** *** 50,54 **** * timestamps returned.<p> * ! * Remaining columns are filled with datasource values for the whole timestamp range, * on a column-per-datasource basis. Use {@link #getColumnCount() getColumnCount()} to find * the number of datasources and {@link #getValues(int) getValues(i)} method to obtain --- 50,54 ---- * timestamps returned.<p> * ! * Remaining cells are filled with datasource values for the whole timestamp range, * on a column-per-datasource basis. Use {@link #getColumnCount() getColumnCount()} to find * the number of datasources and {@link #getValues(int) getValues(i)} method to obtain *************** *** 100,108 **** /** ! * Returns the number of columns fetched from the corresponding RRD. * This number is always equal to the number of datasources defined * in the RRD. Each column represents values of a single datasource. * ! * @return Number of columns (datasources). */ public int getColumnCount() { --- 100,108 ---- /** ! * Returns the number of cells fetched from the corresponding RRD. * This number is always equal to the number of datasources defined * in the RRD. Each column represents values of a single datasource. * ! * @return Number of cells (datasources). */ public int getColumnCount() { Index: RrdDataSet.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdDataSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RrdDataSet.java 21 Sep 2004 08:42:09 -0000 1.4 --- RrdDataSet.java 23 Jan 2005 20:31:25 -0000 1.5 *************** *** 44,50 **** /** ! * Returns the number of columns in this dataset. * ! * @return Number of columns (datasources). */ public int getColumnCount(); --- 44,50 ---- /** ! * Returns the number of cells in this dataset. * ! * @return Number of cells (datasources). */ public int getColumnCount(); Index: Util.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/Util.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Util.java 15 Dec 2004 14:42:44 -0000 1.30 --- Util.java 23 Jan 2005 20:31:25 -0000 1.31 *************** *** 53,56 **** --- 53,59 ---- public class Util { + public static final long MAX_LONG = Long.MAX_VALUE; + public static final long MIN_LONG = -Long.MAX_VALUE; + public static final double MAX_DOUBLE = Double.MAX_VALUE; public static final double MIN_DOUBLE = -Double.MAX_VALUE; *************** *** 69,72 **** --- 72,88 ---- /** + * Converts an array of long primitives to an array of doubles. + * + * @return Same array but with all values as double. + */ + public static double[] toDoubleArray( final long[] array ) + { + double[] values = new double[ array.length ]; + for ( int i = 0; i < array.length; i++ ) + values[i] = array[i]; + return values; + } + + /** * Returns current timestamp in seconds (without milliseconds). Returned timestamp * is obtained with the following expression: <p> |