Class VulkanPushConstantRange.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanPushConstantRange.Builder
- Enclosing class:
VulkanPushConstantRange
Builds instances of type
VulkanPushConstantRange.
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 TypeMethodDescriptionaddAllStageFlags(Iterable<VulkanShaderStageFlag> elements) Adds elements tostageFlagsset.addStageFlags(VulkanShaderStageFlag element) Adds one element tostageFlagsset.addStageFlags(VulkanShaderStageFlag... elements) Adds elements tostageFlagsset.build()Builds a newVulkanPushConstantRange.from(VulkanPushConstantRangeType instance) Fill a builder with attribute values from the providedVulkanPushConstantRangeTypeinstance.setOffset(int offset) Initializes the value for theoffsetattribute.setSize(int size) Initializes the value for thesizeattribute.setStageFlags(Iterable<VulkanShaderStageFlag> elements) Sets or replaces all elements forstageFlagsset.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanPushConstantRangeTypeinstance. 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
-
addStageFlags
Adds one element tostageFlagsset.- Parameters:
element- A stageFlags element- Returns:
thisbuilder for use in a chained invocation
-
addStageFlags
Adds elements tostageFlagsset.- Parameters:
elements- An array of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setStageFlags
public final VulkanPushConstantRange.Builder setStageFlags(Iterable<VulkanShaderStageFlag> elements) Sets or replaces all elements forstageFlagsset.- Parameters:
elements- An iterable of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllStageFlags
public final VulkanPushConstantRange.Builder addAllStageFlags(Iterable<VulkanShaderStageFlag> elements) Adds elements tostageFlagsset.- Parameters:
elements- An iterable of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setOffset
Initializes the value for theoffsetattribute.- Parameters:
offset- The value for offset- Returns:
thisbuilder for use in a chained invocation
-
setSize
Initializes the value for thesizeattribute.- Parameters:
size- The value for size- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanPushConstantRange.- Returns:
- An immutable instance of VulkanPushConstantRange
- Throws:
IllegalStateException- if any required attributes are missing
-