Package com.storedobject.chart
Class SerialTime
java.lang.Object
com.storedobject.chart.SerialTime
- All Implemented Interfaces:
AbstractDataProvider<LocalDateTime>,ComponentPart,ComponentProperty
Implementation of serially increasing/decreasing time values as data.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.chart.AbstractDataProvider
AbstractDataProvider.NumberComparator -
Constructor Summary
ConstructorsConstructorDescriptionSerialTime(long start, long end) Constructor.SerialTime(long start, long end, int step) Constructor.SerialTime(LocalDateTime start, LocalDateTime end) Constructor.SerialTime(LocalDateTime start, LocalDateTime end, int step, ChronoUnit stepUnit) Constructor.SerialTime(LocalDateTime start, LocalDateTime end, ChronoUnit stepUnit) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal DataTypeGet the value type of the data.final intGet the current serial number (Serial number used for internal purposes only).final voidsetSerial(int serial) Set a serial number (Serial number used for internal purposes only).stream()Data provided by this provider as a stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.AbstractDataProvider
asList, create, create, encode, encodeJSON, getComparator, getId, getMax, getMin, getName, validateMethods inherited from interface com.storedobject.chart.ComponentPart
className, getRenderingIndex, setName, setRenderingIndex
-
Constructor Details
-
SerialTime
Constructor.- Parameters:
start- Starting value.end- Ending value.
-
SerialTime
Constructor.- Parameters:
start- Starting value.end- Ending value.stepUnit- Unit of the step.
-
SerialTime
Constructor.- Parameters:
start- Starting value.end- Ending value.step- Step value.stepUnit- Unit of the step.
-
SerialTime
public SerialTime(long start, long end) Constructor.- Parameters:
start- Starting value in milliseconds.end- Ending value in milliseconds.
-
SerialTime
public SerialTime(long start, long end, int step) Constructor.- Parameters:
start- Starting value in milliseconds.end- Ending value in milliseconds.step- Step value in milliseconds.
-
-
Method Details
-
stream
Description copied from interface:AbstractDataProviderData provided by this provider as a stream.Note: The
Streamshould be reproducible after a terminal operation.- Specified by:
streamin interfaceAbstractDataProvider<LocalDateTime>- Returns:
- Stream of data values.
-
getDataType
Description copied from interface:AbstractDataProviderGet the value type of the data.- Specified by:
getDataTypein interfaceAbstractDataProvider<LocalDateTime>- Returns:
- Value type.
-
setSerial
public final void setSerial(int serial) Description copied from interface:ComponentPartSet a serial number (Serial number used for internal purposes only). The implementation of this method must be in such a way that the serial number set here must be returned by theComponentPart.getSerial()method.- Specified by:
setSerialin interfaceComponentPart- Parameters:
serial- Serial number to set.
-
getSerial
public final int getSerial()Description copied from interface:ComponentPartGet the current serial number (Serial number used for internal purposes only). The serial number set by theComponentPart.setSerial(int)method should be returned by this method.- Specified by:
getSerialin interfaceComponentPart- Returns:
- Current serial number.
-