Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Class Info |
|---|
public static class Builder Builder for SamplePoint. |
Constructor Name |
|---|
Builder(DataCollector dataCollector) Creates a Builder object based on the data source. |
| Creates a Builder object based on the data type. |
Qualifier and Type | Method Name and Description |
|---|---|
build() Generates and creates a sampling point. | |
Builder | setActivityField(Field field, String activity) Sets the activity type attribute value. |
Builder | setFieldValue(Field field, double val) Sets the double-precision floating-point attribute value of a sampling point. |
Builder | setFieldValue(String fieldName, double val) Sets the double-precision floating-point attribute value of a sampling point. |
Builder | setFieldValue(Field field, int val) Sets the integer attribute value of a sampling point. |
Builder | setFieldValue(String fieldName, int val) Sets the integer attribute value of a sampling point. |
Builder | setFieldValue(Field field, long val) Sets the long integer attribute value of a sampling point. |
Builder | setFieldValue(String fieldName, long val) Sets the long integer attribute value of a sampling point. |
Builder | setFieldValue(Field field, Map<String, Value> mapVal) Sets the mapped attribute value of a sampling point. |
Builder | setFieldValue(String fieldName, Map<String, Value> mapVal) Sets the mapped attribute value of a sampling point. |
Builder | setFieldValue(Field field, String val) Sets the string attribute value of a sampling point. |
Builder | setFieldValue(String fieldName, String val) Sets the string attribute value of a sampling point. |
Builder | setId(long id) Sets the ID of the sampling point. |
Builder | setMetadata(String metadata) Sets the metadata. |
Builder | setRawDataCollector(DataCollector collector) Sets the raw data collector. |
Builder | setSamplingTime(long sampleTime, TimeUnit timeUnit) Sets the sampling timestamp of instantaneous data. |
Builder | setTimeInterval(long start, long end, TimeUnit timeUnit) Sets the sampling timestamp of data within an interval. |
Constructor |
|---|
public Builder(DataCollector dataCollector) Creates a Builder object based on the data source. |
Parameters
Name | Description |
|---|---|
dataCollector | Data collector. |
Constructor |
|---|
public Builder(DataType dataType) Creates a Builder object based on the data type. |
Parameters
Name | Description |
|---|---|
dataType | Data type. |
Method |
|---|
public SamplePoint build() Generates and creates a sampling point. |
Returns
Type | Description |
|---|---|
Sampling point object. |
Method |
|---|
public Builder setActivityField(Field field, String activity) Sets the activity type attribute value. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
activity | Activity. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(Field field, double val) Sets the double-precision floating-point attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
val | Double-precision floating-point number. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(String fieldName, double val) Sets the double-precision floating-point attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
fieldName | Data attribute name. |
val | Double-precision floating-point number. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(Field field, long val) Sets the long integer attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
val | Long integer. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(String fieldName, long val) Sets the long integer attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
fieldName | Data attribute name. |
val | Long integer. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(Field field, int val) Sets the integer attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
val | Integer. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(String fieldName, int val) Sets the integer attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
fieldName | Data attribute name. |
val | Integer. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(Field field, Map<String, Value> mapVal) Sets the mapped attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
mapVal | Map. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(String fieldName, Map<String, Value> mapVal) Sets the mapped attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
fieldName | Data attribute name. |
mapVal | Map. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(Field field, String val) Sets the string attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
field | Data attribute. |
val | String. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setFieldValue(String fieldName, String val) Sets the string attribute value of a sampling point. |
Parameters
Name | Description |
|---|---|
fieldName | Data attribute name. |
val | String. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setId(long id) Sets the ID of the sampling point. |
Parameters
Name | Description |
|---|---|
id | ID of the sampling point. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setRawDataCollector(DataCollector collector) Sets the raw data collector. |
Parameters
Name | Description |
|---|---|
collector | Data collector. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setSamplingTime(long samplingTime, TimeUnit timeUnit) Sets the sampling timestamp of instantaneous data. |
The sampling point time must be later than the UNIX timestamp corresponding to 00:00 on January 1, 2014.
Parameters
Name | Description |
|---|---|
samplingTime | Timestamp. |
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setTimeInterval(long start, long end, TimeUnit timeUnit) Sets the sampling timestamp of data within an interval. |
1. The start time and end time must be later than the UNIX timestamp corresponding to 00:00 on January 1, 2014.
2. The UNIX timestamp of the end time must be later than that of the start time.
Parameters
Name | Description |
|---|---|
start | Start time. |
end | End time. |
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |
Method |
|---|
public Builder setMetadata(String metadata) Sets the metadata. |
Parameters
Name | Description |
|---|---|
metadata | Metadata, which can be null, an empty string, or a string of 1 to 10000 characters. |
Returns
Type | Description |
|---|---|
Builder | SamplePoint.Builder object. |