Class VMADetailedStatistics.Builder

java.lang.Object
com.io7m.jcoronado.vma.VMADetailedStatistics.Builder
Enclosing class:
VMADetailedStatistics

public static final class VMADetailedStatistics.Builder extends Object
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 Details

    • from

      Fill a builder with attribute values from the provided VMADetailedStatisticsType instance. 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:
      this builder for use in a chained invocation
    • setBlockCount

      public final VMADetailedStatistics.Builder setBlockCount(int blockCount)
      Initializes the value for the blockCount attribute.
      Parameters:
      blockCount - The value for blockCount
      Returns:
      this builder for use in a chained invocation
    • setAllocationCount

      public final VMADetailedStatistics.Builder setAllocationCount(int allocationCount)
      Initializes the value for the allocationCount attribute.
      Parameters:
      allocationCount - The value for allocationCount
      Returns:
      this builder for use in a chained invocation
    • setBlockBytes

      public final VMADetailedStatistics.Builder setBlockBytes(long blockBytes)
      Initializes the value for the blockBytes attribute.
      Parameters:
      blockBytes - The value for blockBytes
      Returns:
      this builder for use in a chained invocation
    • setAllocationBytes

      public final VMADetailedStatistics.Builder setAllocationBytes(long allocationBytes)
      Initializes the value for the allocationBytes attribute.
      Parameters:
      allocationBytes - The value for allocationBytes
      Returns:
      this builder for use in a chained invocation
    • setUnusedRangeCount

      public final VMADetailedStatistics.Builder setUnusedRangeCount(int unusedRangeCount)
      Initializes the value for the unusedRangeCount attribute.
      Parameters:
      unusedRangeCount - The value for unusedRangeCount
      Returns:
      this builder for use in a chained invocation
    • setAllocationSizeMin

      public final VMADetailedStatistics.Builder setAllocationSizeMin(long allocationSizeMin)
      Initializes the value for the allocationSizeMin attribute.
      Parameters:
      allocationSizeMin - The value for allocationSizeMin
      Returns:
      this builder for use in a chained invocation
    • setAllocationSizeMax

      public final VMADetailedStatistics.Builder setAllocationSizeMax(long allocationSizeMax)
      Initializes the value for the allocationSizeMax attribute.
      Parameters:
      allocationSizeMax - The value for allocationSizeMax
      Returns:
      this builder for use in a chained invocation
    • setUnusedRangeSizeMin

      public final VMADetailedStatistics.Builder setUnusedRangeSizeMin(long unusedRangeSizeMin)
      Initializes the value for the unusedRangeSizeMin attribute.
      Parameters:
      unusedRangeSizeMin - The value for unusedRangeSizeMin
      Returns:
      this builder for use in a chained invocation
    • setUnusedRangeSizeMax

      public final VMADetailedStatistics.Builder setUnusedRangeSizeMax(long unusedRangeSizeMax)
      Initializes the value for the unusedRangeSizeMax attribute.
      Parameters:
      unusedRangeSizeMax - The value for unusedRangeSizeMax
      Returns:
      this builder for use in a chained invocation
    • build

      public VMADetailedStatistics build()
      Builds a new VMADetailedStatistics.
      Returns:
      An immutable instance of VMADetailedStatistics
      Throws:
      IllegalStateException - if any required attributes are missing