Package org.apache.gravitino.dto.stats
Class StatisticDTO.Builder
java.lang.Object
org.apache.gravitino.dto.stats.StatisticDTO.Builder
- Enclosing class:
- StatisticDTO
Builder class for constructing instances of
StatisticDTO
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance ofStatisticDTO
with the provided values.Sets the audit information for the statistic.withModifiable
(boolean modifiable) Sets whether the statistic is modifiable.Sets the name of the statistic.withReserved
(boolean reserved) Sets whether the statistic is reserved.withValue
(Optional<StatisticValue<?>> value) Sets the value of the statistic.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
Sets the name of the statistic.- Parameters:
name
- the name of the statistic- Returns:
- the builder instance
-
withValue
Sets the value of the statistic.- Parameters:
value
- the value of the statistic- Returns:
- the builder instance
-
withReserved
Sets whether the statistic is reserved.- Parameters:
reserved
- true if the statistic is reserved, false otherwise- Returns:
- the builder instance
-
withModifiable
Sets whether the statistic is modifiable.- Parameters:
modifiable
- true if the statistic is modifiable, false otherwise- Returns:
- the builder instance
-
withAudit
Sets the audit information for the statistic.- Parameters:
audit
- the audit information- Returns:
- the builder instance
-
build
Builds an instance ofStatisticDTO
with the provided values.- Returns:
- a new instance of
StatisticDTO
-