- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanBlendConstants.Builder
-
- Enclosing class:
- VulkanBlendConstants
public static final class VulkanBlendConstants.Builder extends java.lang.Object
Builds instances of typeVulkanBlendConstants
. 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 VulkanBlendConstants
build()
Builds a newVulkanBlendConstants
.VulkanBlendConstants.Builder
from(VulkanBlendConstantsType instance)
Fill a builder with attribute values from the providedVulkanBlendConstantsType
instance.VulkanBlendConstants.Builder
setA(float a)
Initializes the value for thea
attribute.VulkanBlendConstants.Builder
setB(float b)
Initializes the value for theb
attribute.VulkanBlendConstants.Builder
setG(float g)
Initializes the value for theg
attribute.VulkanBlendConstants.Builder
setR(float r)
Initializes the value for ther
attribute.
-
-
-
Method Detail
-
from
public final VulkanBlendConstants.Builder from(VulkanBlendConstantsType instance)
Fill a builder with attribute values from the providedVulkanBlendConstantsType
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
-
setR
public final VulkanBlendConstants.Builder setR(float r)
Initializes the value for ther
attribute.- Parameters:
r
- The value for r- Returns:
this
builder for use in a chained invocation
-
setG
public final VulkanBlendConstants.Builder setG(float g)
Initializes the value for theg
attribute.- Parameters:
g
- The value for g- Returns:
this
builder for use in a chained invocation
-
setB
public final VulkanBlendConstants.Builder setB(float b)
Initializes the value for theb
attribute.- Parameters:
b
- The value for b- Returns:
this
builder for use in a chained invocation
-
setA
public final VulkanBlendConstants.Builder setA(float a)
Initializes the value for thea
attribute.- Parameters:
a
- The value for a- Returns:
this
builder for use in a chained invocation
-
build
public VulkanBlendConstants build()
Builds a newVulkanBlendConstants
.- Returns:
- An immutable instance of VulkanBlendConstants
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-