Class VMADetailedStatistics.Builder
java.lang.Object
com.io7m.jcoronado.vma.VMADetailedStatistics.Builder
- Enclosing class:
VMADetailedStatistics
Builds instances of type
VMADetailedStatistics.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newVMADetailedStatistics.from(VMADetailedStatisticsType instance) Fill a builder with attribute values from the providedVMADetailedStatisticsTypeinstance.setAllocationBytes(long allocationBytes) Initializes the value for theallocationBytesattribute.setAllocationCount(int allocationCount) Initializes the value for theallocationCountattribute.setAllocationSizeMax(long allocationSizeMax) Initializes the value for theallocationSizeMaxattribute.setAllocationSizeMin(long allocationSizeMin) Initializes the value for theallocationSizeMinattribute.setBlockBytes(long blockBytes) Initializes the value for theblockBytesattribute.setBlockCount(int blockCount) Initializes the value for theblockCountattribute.setUnusedRangeCount(int unusedRangeCount) Initializes the value for theunusedRangeCountattribute.setUnusedRangeSizeMax(long unusedRangeSizeMax) Initializes the value for theunusedRangeSizeMaxattribute.setUnusedRangeSizeMin(long unusedRangeSizeMin) Initializes the value for theunusedRangeSizeMinattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVMADetailedStatisticsTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setBlockCount
Initializes the value for theblockCountattribute.- Parameters:
blockCount- The value for blockCount- Returns:
thisbuilder for use in a chained invocation
-
setAllocationCount
Initializes the value for theallocationCountattribute.- Parameters:
allocationCount- The value for allocationCount- Returns:
thisbuilder for use in a chained invocation
-
setBlockBytes
Initializes the value for theblockBytesattribute.- Parameters:
blockBytes- The value for blockBytes- Returns:
thisbuilder for use in a chained invocation
-
setAllocationBytes
Initializes the value for theallocationBytesattribute.- Parameters:
allocationBytes- The value for allocationBytes- Returns:
thisbuilder for use in a chained invocation
-
setUnusedRangeCount
Initializes the value for theunusedRangeCountattribute.- Parameters:
unusedRangeCount- The value for unusedRangeCount- Returns:
thisbuilder for use in a chained invocation
-
setAllocationSizeMin
Initializes the value for theallocationSizeMinattribute.- Parameters:
allocationSizeMin- The value for allocationSizeMin- Returns:
thisbuilder for use in a chained invocation
-
setAllocationSizeMax
Initializes the value for theallocationSizeMaxattribute.- Parameters:
allocationSizeMax- The value for allocationSizeMax- Returns:
thisbuilder for use in a chained invocation
-
setUnusedRangeSizeMin
Initializes the value for theunusedRangeSizeMinattribute.- Parameters:
unusedRangeSizeMin- The value for unusedRangeSizeMin- Returns:
thisbuilder for use in a chained invocation
-
setUnusedRangeSizeMax
Initializes the value for theunusedRangeSizeMaxattribute.- Parameters:
unusedRangeSizeMax- The value for unusedRangeSizeMax- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVMADetailedStatistics.- Returns:
- An immutable instance of VMADetailedStatistics
- Throws:
IllegalStateException- if any required attributes are missing
-