Class VMATotalStatistics.Builder
java.lang.Object
com.io7m.jcoronado.vma.VMATotalStatistics.Builder
- Enclosing class:
VMATotalStatistics
Builds instances of type
VMATotalStatistics.
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 TypeMethodDescriptionaddAllHeaps(Iterable<? extends VMADetailedStatistics> elements) Adds elements toheapslist.addAllMemoryTypes(Iterable<? extends VMADetailedStatistics> elements) Adds elements tomemoryTypeslist.addHeaps(VMADetailedStatistics element) Adds one element toheapslist.addHeaps(VMADetailedStatistics... elements) Adds elements toheapslist.addMemoryTypes(VMADetailedStatistics element) Adds one element tomemoryTypeslist.addMemoryTypes(VMADetailedStatistics... elements) Adds elements tomemoryTypeslist.build()Builds a newVMATotalStatistics.from(VMATotalStatisticsType instance) Fill a builder with attribute values from the providedVMATotalStatisticsTypeinstance.setHeaps(Iterable<? extends VMADetailedStatistics> elements) Sets or replaces all elements forheapslist.setMemoryTypes(Iterable<? extends VMADetailedStatistics> elements) Sets or replaces all elements formemoryTypeslist.setTotal(VMADetailedStatistics total) Initializes the value for thetotalattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVMATotalStatisticsTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setTotal
Initializes the value for thetotalattribute.- Parameters:
total- The value for total- Returns:
thisbuilder for use in a chained invocation
-
addHeaps
Adds one element toheapslist.- Parameters:
element- A heaps element- Returns:
thisbuilder for use in a chained invocation
-
addHeaps
Adds elements toheapslist.- Parameters:
elements- An array of heaps elements- Returns:
thisbuilder for use in a chained invocation
-
setHeaps
public final VMATotalStatistics.Builder setHeaps(Iterable<? extends VMADetailedStatistics> elements) Sets or replaces all elements forheapslist.- Parameters:
elements- An iterable of heaps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllHeaps
public final VMATotalStatistics.Builder addAllHeaps(Iterable<? extends VMADetailedStatistics> elements) Adds elements toheapslist.- Parameters:
elements- An iterable of heaps elements- Returns:
thisbuilder for use in a chained invocation
-
addMemoryTypes
Adds one element tomemoryTypeslist.- Parameters:
element- A memoryTypes element- Returns:
thisbuilder for use in a chained invocation
-
addMemoryTypes
Adds elements tomemoryTypeslist.- Parameters:
elements- An array of memoryTypes elements- Returns:
thisbuilder for use in a chained invocation
-
setMemoryTypes
public final VMATotalStatistics.Builder setMemoryTypes(Iterable<? extends VMADetailedStatistics> elements) Sets or replaces all elements formemoryTypeslist.- Parameters:
elements- An iterable of memoryTypes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMemoryTypes
public final VMATotalStatistics.Builder addAllMemoryTypes(Iterable<? extends VMADetailedStatistics> elements) Adds elements tomemoryTypeslist.- Parameters:
elements- An iterable of memoryTypes elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVMATotalStatistics.- Returns:
- An immutable instance of VMATotalStatistics
- Throws:
IllegalStateException- if any required attributes are missing
-