Class VulkanBufferViewCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferViewCreateInfo.Builder
- Enclosing class:
VulkanBufferViewCreateInfo
Builds instances of type
VulkanBufferViewCreateInfo.
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 TypeMethodDescriptionaddAllFlags(Iterable<VulkanBufferViewCreateFlag> elements) Adds elements toflagsset.addFlags(VulkanBufferViewCreateFlag element) Adds one element toflagsset.addFlags(VulkanBufferViewCreateFlag... elements) Adds elements toflagsset.build()Builds a newVulkanBufferViewCreateInfo.from(VulkanBufferViewCreateInfoType instance) Fill a builder with attribute values from the providedVulkanBufferViewCreateInfoTypeinstance.setBuffer(VulkanBufferType buffer) Initializes the value for thebufferattribute.setFlags(Iterable<VulkanBufferViewCreateFlag> elements) Sets or replaces all elements forflagsset.setFormat(VulkanFormat format) Initializes the value for theformatattribute.setOffset(long offset) Initializes the value for theoffsetattribute.setRange(long range) Initializes the value for therangeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanBufferViewCreateInfoTypeinstance. 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
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
public final VulkanBufferViewCreateInfo.Builder setFlags(Iterable<VulkanBufferViewCreateFlag> elements) Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
public final VulkanBufferViewCreateInfo.Builder addAllFlags(Iterable<VulkanBufferViewCreateFlag> elements) Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setBuffer
Initializes the value for thebufferattribute.- Parameters:
buffer- The value for buffer- Returns:
thisbuilder for use in a chained invocation
-
setFormat
Initializes the value for theformatattribute.- Parameters:
format- The value for format- 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
-
setRange
Initializes the value for therangeattribute.- Parameters:
range- The value for range- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanBufferViewCreateInfo.- Returns:
- An immutable instance of VulkanBufferViewCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-