- java.lang.Object
-
- com.io7m.jcoronado.vma.VMAAllocationResult.Builder<T>
-
- Enclosing class:
- VMAAllocationResult<T>
public static final class VMAAllocationResult.Builder<T> extends java.lang.Object
Builds instances of typeVMAAllocationResult
. Initialize attributes and then invoke thebuild()
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VMAAllocationResult<T>
build()
Builds a newVMAAllocationResult
.VMAAllocationResult.Builder<T>
from(VMAAllocationResultType<T> instance)
Fill a builder with attribute values from the providedVMAAllocationResultType
instance.VMAAllocationResult.Builder<T>
setAllocation(VMAAllocationType allocation)
Initializes the value for theallocation
attribute.VMAAllocationResult.Builder<T>
setResult(T result)
Initializes the value for theresult
attribute.
-
-
-
Method Detail
-
from
public final VMAAllocationResult.Builder<T> from(VMAAllocationResultType<T> instance)
Fill a builder with attribute values from the providedVMAAllocationResultType
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
-
setAllocation
public final VMAAllocationResult.Builder<T> setAllocation(VMAAllocationType allocation)
Initializes the value for theallocation
attribute.- Parameters:
allocation
- The value for allocation- Returns:
this
builder for use in a chained invocation
-
setResult
public final VMAAllocationResult.Builder<T> setResult(T result)
Initializes the value for theresult
attribute.- Parameters:
result
- The value for result- Returns:
this
builder for use in a chained invocation
-
build
public VMAAllocationResult<T> build()
Builds a newVMAAllocationResult
.- Returns:
- An immutable instance of VMAAllocationResult
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-