- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageCreateInfo.Builder
-
- Enclosing class:
- VulkanImageCreateInfo
public static final class VulkanImageCreateInfo.Builder extends java.lang.Object
Builds instances of typeVulkanImageCreateInfo
. 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
-
-
-
Method Detail
-
from
public final VulkanImageCreateInfo.Builder from(VulkanImageCreateInfoType instance)
Fill a builder with attribute values from the providedVulkanImageCreateInfoType
instance. 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:
this
builder for use in a chained invocation
-
addFlags
public final VulkanImageCreateInfo.Builder addFlags(VulkanImageCreateFlag element)
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
public final VulkanImageCreateInfo.Builder addFlags(VulkanImageCreateFlag... elements)
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VulkanImageCreateInfo.Builder setFlags(java.lang.Iterable<VulkanImageCreateFlag> elements)
Sets or replaces all elements forflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
addAllFlags
public final VulkanImageCreateInfo.Builder addAllFlags(java.lang.Iterable<VulkanImageCreateFlag> elements)
Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setImageType
public final VulkanImageCreateInfo.Builder setImageType(VulkanImageKind imageType)
Initializes the value for theimageType
attribute.- Parameters:
imageType
- The value for imageType- Returns:
this
builder for use in a chained invocation
-
setFormat
public final VulkanImageCreateInfo.Builder setFormat(VulkanFormat format)
Initializes the value for theformat
attribute.- Parameters:
format
- The value for format- Returns:
this
builder for use in a chained invocation
-
setExtent
public final VulkanImageCreateInfo.Builder setExtent(VulkanExtent3D extent)
Initializes the value for theextent
attribute.- Parameters:
extent
- The value for extent- Returns:
this
builder for use in a chained invocation
-
setMipLevels
public final VulkanImageCreateInfo.Builder setMipLevels(int mipLevels)
Initializes the value for themipLevels
attribute.- Parameters:
mipLevels
- The value for mipLevels- Returns:
this
builder for use in a chained invocation
-
setArrayLayers
public final VulkanImageCreateInfo.Builder setArrayLayers(int arrayLayers)
Initializes the value for thearrayLayers
attribute.- Parameters:
arrayLayers
- The value for arrayLayers- Returns:
this
builder for use in a chained invocation
-
addSamples
public final VulkanImageCreateInfo.Builder addSamples(VulkanSampleCountFlag element)
Adds one element tosamples
set.- Parameters:
element
- A samples element- Returns:
this
builder for use in a chained invocation
-
addSamples
public final VulkanImageCreateInfo.Builder addSamples(VulkanSampleCountFlag... elements)
Adds elements tosamples
set.- Parameters:
elements
- An array of samples elements- Returns:
this
builder for use in a chained invocation
-
setSamples
public final VulkanImageCreateInfo.Builder setSamples(java.lang.Iterable<VulkanSampleCountFlag> elements)
Sets or replaces all elements forsamples
set.- Parameters:
elements
- An iterable of samples elements- Returns:
this
builder for use in a chained invocation
-
addAllSamples
public final VulkanImageCreateInfo.Builder addAllSamples(java.lang.Iterable<VulkanSampleCountFlag> elements)
Adds elements tosamples
set.- Parameters:
elements
- An iterable of samples elements- Returns:
this
builder for use in a chained invocation
-
setTiling
public final VulkanImageCreateInfo.Builder setTiling(VulkanImageTiling tiling)
Initializes the value for thetiling
attribute.- Parameters:
tiling
- The value for tiling- Returns:
this
builder for use in a chained invocation
-
addUsage
public final VulkanImageCreateInfo.Builder addUsage(VulkanImageUsageFlag element)
Adds one element tousage
set.- Parameters:
element
- A usage element- Returns:
this
builder for use in a chained invocation
-
addUsage
public final VulkanImageCreateInfo.Builder addUsage(VulkanImageUsageFlag... elements)
Adds elements tousage
set.- Parameters:
elements
- An array of usage elements- Returns:
this
builder for use in a chained invocation
-
setUsage
public final VulkanImageCreateInfo.Builder setUsage(java.lang.Iterable<VulkanImageUsageFlag> elements)
Sets or replaces all elements forusage
set.- Parameters:
elements
- An iterable of usage elements- Returns:
this
builder for use in a chained invocation
-
addAllUsage
public final VulkanImageCreateInfo.Builder addAllUsage(java.lang.Iterable<VulkanImageUsageFlag> elements)
Adds elements tousage
set.- Parameters:
elements
- An iterable of usage elements- Returns:
this
builder for use in a chained invocation
-
setSharingMode
public final VulkanImageCreateInfo.Builder setSharingMode(VulkanSharingMode sharingMode)
Initializes the value for thesharingMode
attribute.- Parameters:
sharingMode
- The value for sharingMode- Returns:
this
builder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanImageCreateInfo.Builder addQueueFamilyIndices(int element)
Adds one element toqueueFamilyIndices
list.- Parameters:
element
- A queueFamilyIndices element- Returns:
this
builder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanImageCreateInfo.Builder addQueueFamilyIndices(int... elements)
Adds elements toqueueFamilyIndices
list.- Parameters:
elements
- An array of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
setQueueFamilyIndices
public final VulkanImageCreateInfo.Builder setQueueFamilyIndices(java.lang.Iterable<java.lang.Integer> elements)
Sets or replaces all elements forqueueFamilyIndices
list.- Parameters:
elements
- An iterable of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
addAllQueueFamilyIndices
public final VulkanImageCreateInfo.Builder addAllQueueFamilyIndices(java.lang.Iterable<java.lang.Integer> elements)
Adds elements toqueueFamilyIndices
list.- Parameters:
elements
- An iterable of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
setInitialLayout
public final VulkanImageCreateInfo.Builder setInitialLayout(VulkanImageLayout initialLayout)
Initializes the value for theinitialLayout
attribute.- Parameters:
initialLayout
- The value for initialLayout- Returns:
this
builder for use in a chained invocation
-
build
public VulkanImageCreateInfo build()
Builds a newVulkanImageCreateInfo
.- Returns:
- An immutable instance of VulkanImageCreateInfo
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-