We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

SamplePoint.Builder

Expand

Class Info

public static class Builder

Builder for SamplePoint.

Public Constructor Summary

Expand

Constructor Name

Builder(DataCollector dataCollector)

Creates a Builder object based on the data source.

Builder(DataType dataType)

Creates a Builder object based on the data type.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

SamplePoint

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.

Public Constructors

Builder(DataCollector dataCollector)

Expand

Constructor

public Builder(DataCollector dataCollector)

Creates a Builder object based on the data source.

Parameters

Expand

Name

Description

dataCollector

Data collector.

Builder(DataType dataType)

Expand

Constructor

public Builder(DataType dataType)

Creates a Builder object based on the data type.

Parameters

Expand

Name

Description

dataType

Data type.

Public Methods

build()

Expand

Method

public SamplePoint build()

Generates and creates a sampling point.

Returns

Expand

Type

Description

SamplePoint

Sampling point object.

setActivityField(Field field, String activity)

Expand

Method

public Builder setActivityField(Field field, String activity)

Sets the activity type attribute value.

Parameters

Expand

Name

Description

field

Data attribute.

activity

Activity.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(Field field, double val)

Expand

Method

public Builder setFieldValue(Field field, double val)

Sets the double-precision floating-point attribute value of a sampling point.

Parameters

Expand

Name

Description

field

Data attribute.

val

Double-precision floating-point number.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(String fieldName, double val)

Expand

Method

public Builder setFieldValue(String fieldName, double val)

Sets the double-precision floating-point attribute value of a sampling point.

Parameters

Expand

Name

Description

fieldName

Data attribute name.

val

Double-precision floating-point number.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(Field field, long val)

Expand

Method

public Builder setFieldValue(Field field, long val)

Sets the long integer attribute value of a sampling point.

Parameters

Expand

Name

Description

field

Data attribute.

val

Long integer.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(String fieldName, long val)

Expand

Method

public Builder setFieldValue(String fieldName, long val)

Sets the long integer attribute value of a sampling point.

Parameters

Expand

Name

Description

fieldName

Data attribute name.

val

Long integer.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(Field field, int val)

Expand

Method

public Builder setFieldValue(Field field, int val)

Sets the integer attribute value of a sampling point.

Parameters

Expand

Name

Description

field

Data attribute.

val

Integer.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(String fieldName, int val)

Expand

Method

public Builder setFieldValue(String fieldName, int val)

Sets the integer attribute value of a sampling point.

Parameters

Expand

Name

Description

fieldName

Data attribute name.

val

Integer.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(Field field, Map<String, Value> mapVal)

Expand

Method

public Builder setFieldValue(Field field, Map<String, Value> mapVal)

Sets the mapped attribute value of a sampling point.

Parameters

Expand

Name

Description

field

Data attribute.

mapVal

Map.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(String fieldName, Map<String, Value> mapVal)

Expand

Method

public Builder setFieldValue(String fieldName, Map<String, Value> mapVal)

Sets the mapped attribute value of a sampling point.

Parameters

Expand

Name

Description

fieldName

Data attribute name.

mapVal

Map.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(Field field, String val)

Expand

Method

public Builder setFieldValue(Field field, String val)

Sets the string attribute value of a sampling point.

Parameters

Expand

Name

Description

field

Data attribute.

val

String.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setFieldValue(String fieldName, String val)

Expand

Method

public Builder setFieldValue(String fieldName, String val)

Sets the string attribute value of a sampling point.

Parameters

Expand

Name

Description

fieldName

Data attribute name.

val

String.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setId(long id)

Expand

Method

public Builder setId(long id)

Sets the ID of the sampling point.

Parameters

Expand

Name

Description

id

ID of the sampling point.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setRawDataCollector(DataCollector collector)

Expand

Method

public Builder setRawDataCollector(DataCollector collector)

Sets the raw data collector.

Parameters

Expand

Name

Description

collector

Data collector.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setSamplingTime(long samplingTime, TimeUnit timeUnit)

Expand

Method

public Builder setSamplingTime(long samplingTime, TimeUnit timeUnit)

Sets the sampling timestamp of instantaneous data.

NOTE

The sampling point time must be later than the UNIX timestamp corresponding to 00:00 on January 1, 2014.

Parameters

Expand

Name

Description

samplingTime

Timestamp.

timeUnit

Time unit.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setTimeInterval(long start, long end, TimeUnit timeUnit)

Expand

Method

public Builder setTimeInterval(long start, long end, TimeUnit timeUnit)

Sets the sampling timestamp of data within an interval.

NOTE

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

Expand

Name

Description

start

Start time.

end

End time.

timeUnit

Time unit.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

setMetadata(String metadata)

Expand

Method

public Builder setMetadata(String metadata)

Sets the metadata.

Parameters

Expand

Name

Description

metadata

Metadata, which can be null, an empty string, or a string of 1 to 10000 characters.

Returns

Expand

Type

Description

Builder

SamplePoint.Builder object.

Search in References
Enter a keyword.