|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LiveGraph.dataCache.DataSet
public class DataSet
This class defines a dataset and encapsulates related data; a dataset holds one data value for each of the data series held in the cache and corresponds to a data row in the underlying data file.
This product includes software developed by the
LiveGraph project and its contributors.
(http://www.live-graph.org)
Copyright (c) 2007 G. Paperin.
All rights reserved.
File: DataSet.java
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following terms and conditions are met:
1. Redistributions of source code must retain the above
acknowledgement of the LiveGraph project and its web-site, the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above acknowledgement of the
LiveGraph project and its web-site, the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with
the distribution.
3. All advertising materials mentioning features or use of this software or any derived
software must display the following acknowledgement:
This product includes software developed by the LiveGraph project and its
contributors.
(http://www.live-graph.org)
4. All advertising materials distributed in form of HTML pages or any other technology
permitting active hyper-links that mention features or use of this software or any
derived software must display the acknowledgment specified in condition 3 of this
agreement, and in addition, include a visible and working hyper-link to the LiveGraph
homepage (http://www.live-graph.org).
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Nested Class Summary | |
---|---|
static class |
DataSet.DefRetValue
Possible default return values; a default return value is used when a dataset is queried for a value at an invalid index or when the index was valid, but corresponding value in the underlying data file could not be interpreted as a legal data value. |
Field Summary | |
---|---|
private int |
dataFileIndex
The index of the data row represented by this dataset in the original file. |
static DataSet.DefRetValue |
returnValueForIllegalIndex
The currently used default rteturn value. |
private java.lang.Double[] |
values
Values of this dataset. |
Constructor Summary | |
---|---|
DataSet(double[] values,
int dataFileIndex)
Constructor. |
|
DataSet(java.lang.Double[] values,
int dataFileIndex)
Constructor. |
|
DataSet(java.util.List<java.lang.Double> values,
int dataFileIndex)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Integer dataFileIndex)
Compares this set with an integer on the basis on the set's dataFileIndex . |
int |
getDataFileIndex()
|
double |
getValue(int seriesIndex)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static DataSet.DefRetValue returnValueForIllegalIndex
private java.lang.Double[] values
private int dataFileIndex
dataFileIndex = 0
, although it will probably
not be the very first row in the file because several comment and info rows
as well as a column label might preceed it.
Constructor Detail |
---|
public DataSet(java.util.List<java.lang.Double> values, int dataFileIndex)
values
- Dava values for this set.dataFileIndex
- The dafa file index of this set.dataFileIndex
public DataSet(double[] values, int dataFileIndex)
values
- Dava values for this set.dataFileIndex
- The dafa file index of this set.dataFileIndex
public DataSet(java.lang.Double[] values, int dataFileIndex)
values
- Dava values for this set.dataFileIndex
- The dafa file index of this set.dataFileIndex
Method Detail |
---|
public int getDataFileIndex()
dataFileIndex = 0
, although it will probably
not be the very first row in the file because several comment and info rows
as well as a column label might preceed it.)public int compareTo(java.lang.Integer dataFileIndex)
dataFileIndex
.
compareTo
in interface java.lang.Comparable<java.lang.Integer>
dataFileIndex
- An integer representing a potential data file index.
< 0
if this dataset preceeded the specified index in the data file;
a value > 0
if this dataset followed the specified index in the data file;
0
if this dataset was located at specified index in the data file.dataFileIndex
public double getValue(int seriesIndex)
seriesIndex
- A data series index (0 based data column number).
public java.lang.String toString()
toString
in class java.lang.Object
|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |