Package com.storedobject.chart
Record Class InternalData.WrappedDataProvider<T>
java.lang.Object
java.lang.Record
com.storedobject.chart.InternalData.WrappedDataProvider<T>
- Type Parameters:
T- Type of the data provider.- Record Components:
dataProvider- Data provider.
- All Implemented Interfaces:
AbstractDataProvider<T>,ComponentPart,ComponentProperty,InternalData<T>,InternalDataProvider
- Enclosing interface:
InternalData<T>
public static record InternalData.WrappedDataProvider<T>(AbstractDataProvider<T> dataProvider)
extends Record
implements InternalData<T>
A wrapper class to convert any instance of
AbstractDataProvider to an instance of
InternalDataProvider.- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.chart.AbstractDataProvider
AbstractDataProvider.NumberComparatorNested classes/interfaces inherited from interface com.storedobject.chart.InternalData
InternalData.WrappedDataProvider<T> -
Constructor Summary
ConstructorsConstructorDescriptionWrappedDataProvider(AbstractDataProvider<T> dataProvider) Creates an instance of aWrappedDataProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataProviderrecord component.final booleanIndicates whether some other object is "equal to" this one.Get the value type of the data.intGet the current serial number (Serial number used for internal purposes only).final inthashCode()Returns a hash code value for this object.voidsetSerial(int serial) Set a serial number (Serial number used for internal purposes only).stream()Data provided by this provider as a stream.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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
-
WrappedDataProvider
Creates an instance of aWrappedDataProviderrecord class.- Parameters:
dataProvider- the value for thedataProviderrecord component
-
-
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<T>- Returns:
- Stream of data values.
-
getDataType
Description copied from interface:AbstractDataProviderGet the value type of the data.- Specified by:
getDataTypein interfaceAbstractDataProvider<T>- Returns:
- Value type.
-
setSerial
public 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 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.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
dataProvider
Returns the value of thedataProviderrecord component.- Returns:
- the value of the
dataProviderrecord component
-