|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.android.activityminer.model.timeseries.SensorObservationCutoutImpl<T,U>
T
- the enumeration type for the sensor observation dimensionsU
- the data type for the dimension valuespublic final class SensorObservationCutoutImpl<T extends Enum<T> & Dimensions,U>
A sensor observation cut-out does hold a subsequence of a longer time series of sensor observations.
Field Summary | |
---|---|
private List<SensorObservation<T,U>> |
sensorObservations
The list with the sensor observations. |
Constructor Summary | |
---|---|
SensorObservationCutoutImpl()
Constructor |
|
SensorObservationCutoutImpl(List<SensorObservation<T,U>> sensorObservations)
Constructor |
Method Summary | |
---|---|
void |
addObservation(SensorObservation<T,U> observation)
Method to add a sensor observation to this type. |
void |
addObservations(List<? extends SensorObservation<T,U>> observations)
Method to add a sample collection to this type. |
void |
clear()
Method to clear the current content. |
void |
cutBeforeTime(long startTimeStamp)
Method to cut the cut-out by removing all observations younger than the given time stamp. |
List<U> |
getDimensionValues(T dimension)
Getter for the values of a specific dimension. |
U[] |
getDimensionValuesAsArray(T dimension)
Getter for the values of a specific dimension as array. |
long |
getDuration()
Getter for the duration of the sensor observation series. |
SensorObservation<T,U> |
getSensorObservation(int pos)
Getter for the sensor observations at a given position. |
List<SensorObservation<T,U>> |
getSensorObservations()
Getter for the sensor observations. |
List<SensorObservation<T,U>> |
getSensorObservations(int startPos,
int cnt)
Getter for the given count of sensor observations from a given start position. |
long |
getStartTime()
getter for the start time |
Long |
getTimeStamp(int index)
Getter for the time stamp at the given index. |
List<Long> |
getTimeStamps()
Getter for the time stamps of the sensor observation series. |
Long[] |
getTimeStampsAsArray()
Getter for the time stamps the sensor observation series as Array. |
U |
getValue(T dimension,
int index)
Getter for a single sensor value of a specific dimension at the given index. |
int |
size()
Getter for the frame size ( current sample count in this frame ). |
String |
toXML()
|
void |
truncateAfterTime(long maxTimeStamp)
Method to truncate the cut-out by removing all observations older than the given time stamp. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final List<SensorObservation<T extends Enum<T> & Dimensions,U>> sensorObservations
Constructor Detail |
---|
public SensorObservationCutoutImpl(List<SensorObservation<T,U>> sensorObservations)
sensorObservations
- the sensor observationspublic SensorObservationCutoutImpl()
Method Detail |
---|
public final void addObservation(SensorObservation<T,U> observation)
SensorObservationCutout
addObservation
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
observation
- the observation to addpublic final void addObservations(List<? extends SensorObservation<T,U>> observations)
SensorObservationCutout
addObservations
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
observations
- the observations to addpublic List<SensorObservation<T,U>> getSensorObservations()
SensorObservationCutout
getSensorObservations
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public List<SensorObservation<T,U>> getSensorObservations(int startPos, int cnt)
SensorObservationCutout
getSensorObservations
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
startPos
- the start positioncnt
- the count
public SensorObservation<T,U> getSensorObservation(int pos)
SensorObservationCutout
getSensorObservation
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
pos
- the position
public final List<U> getDimensionValues(T dimension)
SensorObservationCutout
getDimensionValues
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
dimension
- the requested dimension
public final U[] getDimensionValuesAsArray(T dimension)
SensorObservationCutout
getDimensionValuesAsArray
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
dimension
- the requested dimension
public final int size()
SensorObservationCutout
size
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public final void clear()
SensorObservationCutout
clear
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public final List<Long> getTimeStamps()
SensorObservationCutout
getTimeStamps
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public long getDuration()
SensorObservationCutout
getDuration
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public final Long[] getTimeStampsAsArray()
SensorObservationCutout
getTimeStampsAsArray
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
public final String toXML() throws Exception
toXML
in interface SerializableData
Exception
public U getValue(T dimension, int index)
SensorObservationCutout
getValue
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
dimension
- the requested sensor observation dimensionindex
- the index position in the time series of sensor observations
public Long getTimeStamp(int index)
SensorObservationCutout
getTimeStamp
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
index
- the index position in the time series of sensor observations
public void truncateAfterTime(long maxTimeStamp)
SensorObservationCutout
truncateAfterTime
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
maxTimeStamp
- the maximum time stamp to truncate forpublic void cutBeforeTime(long startTimeStamp)
SensorObservationCutout
cutBeforeTime
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
startTimeStamp
- the new minimum time stamp to set as start timepublic long getStartTime()
SensorObservationCutout
getStartTime
in interface SensorObservationCutout<T extends Enum<T> & Dimensions,U>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |