Package com.storedobject.chart
Class SerialData
java.lang.Object
com.storedobject.chart.SerialData
- All Implemented Interfaces:
AbstractDataProvider<Integer>,ComponentPart,ComponentProperty
Implementation of serially increasing/decreasing numbers as data.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.chart.AbstractDataProvider
AbstractDataProvider.NumberComparator -
Constructor Summary
ConstructorsConstructorDescriptionSerialData(int start, int end) Constructor.SerialData(int start, int end, int step) 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
-
SerialData
public SerialData(int start, int end) Constructor.- Parameters:
start- Starting value.end- Ending value.
-
SerialData
public SerialData(int start, int end, int step) Constructor.- Parameters:
start- Starting value.end- Ending value.step- Step value.
-
-
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<Integer>- Returns:
- Stream of data values.
-
getDataType
Description copied from interface:AbstractDataProviderGet the value type of the data.- Specified by:
getDataTypein interfaceAbstractDataProvider<Integer>- 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.
-