Class VMAHeapBudget.Builder

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

public static final class VMAHeapBudget.Builder extends Object
Builds instances of type VMAHeapBudget. 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

      public final VMAHeapBudget.Builder from(VMAHeapBudgetType instance)
      Fill a builder with attribute values from the provided VMAHeapBudgetType 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
    • setUsage

      public final VMAHeapBudget.Builder setUsage(long usage)
      Initializes the value for the usage attribute.
      Parameters:
      usage - The value for usage
      Returns:
      this builder for use in a chained invocation
    • setBudget

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

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