public class HdbDataSet extends Object
Constructor and Description |
---|
HdbDataSet()
Construct an empty HdbDataSet
|
HdbDataSet(ArrayList<HdbData> data)
Construct a HdbDataSet with the given HdbData
|
Modifier and Type | Method and Description |
---|---|
void |
applyConversionFactor(double f)
Apply a conversion factor to the data set.
|
HdbData |
get(int idx)
Return HdbData at the specified index
|
HdbData |
getBefore(long time)
Return the HdbData just before the given time
if no data exists before, return the first item, null if the list is empty
|
long[] |
getDataTimeArray()
Returns all timestamp of this dataset as an array
|
HdbData |
getLast()
Get last data of this data set
|
String |
getName()
Get the name of this dataset
|
int |
getType()
Get the name of this dataset
|
double[] |
getValueAsDoubleArray()
Returns all read value of this dataset as a double array, for scalar and numerical type only.
|
long[] |
getValueAsLongArray()
Returns all read value of this dataset as a long array, for scalar and integer type only.
|
double[] |
getWriteValueAsDoubleArray()
Returns all write value of this dataset as a double array, for scalar and numerical type only.
|
long[] |
getWriteValueAsLongArray()
Returns all write value of this dataset as a long array, for scalar and integer type only.
|
boolean |
isEmpty()
Returns true whether this dataset is empty
|
void |
removeFirst()
Remove first item
|
void |
removeHasFailed()
Remove all HdbData which have failed
|
void |
setInvalidValueForInteger(long invalid)
Sets the value returned if a data has failed when calling getDataAsLongIntArray.
|
void |
setName(String name)
Set the name of this dataset
|
void |
setType(int type)
Set the type of this dataset
|
int |
size()
Return size of this HdbDataSet
|
public void setType(int type)
type
- Typepublic int getType()
public void setName(String name)
name
- Namepublic String getName()
public int size()
public void applyConversionFactor(double f)
f
- Conversion factorpublic HdbData get(int idx)
idx
- public HdbData getLast()
public boolean isEmpty()
public void removeHasFailed()
public void removeFirst()
public HdbData getBefore(long time)
time
- time stamps in us since epochpublic long[] getDataTimeArray()
public double[] getValueAsDoubleArray() throws HdbFailed
HdbFailed
- If the type cannot be converted or is not a scalar typepublic double[] getWriteValueAsDoubleArray() throws HdbFailed
HdbFailed
- If the type cannot be converted or is not a scalar typepublic void setInvalidValueForInteger(long invalid)
invalid
- Invalid valuepublic long[] getValueAsLongArray() throws HdbFailed
HdbFailed
- If the type cannot be converted or is not a scalar typepublic long[] getWriteValueAsLongArray() throws HdbFailed
HdbFailed
- If the type cannot be converted or is not a scalar typeCopyright © 2017. All rights reserved.