- java.lang.Object
-
- com.io7m.jcoronado.vma.VMAAllocationCreateInfo.Builder
-
- Enclosing class:
- VMAAllocationCreateInfo
public static final class VMAAllocationCreateInfo.Builder extends java.lang.Object
Builds instances of typeVMAAllocationCreateInfo
. 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 VMAAllocationCreateInfo.Builder from(VMAAllocationCreateInfoType instance)
Fill a builder with attribute values from the providedVMAAllocationCreateInfoType
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 VMAAllocationCreateInfo.Builder addFlags(VMAAllocationCreateFlag element)
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
public final VMAAllocationCreateInfo.Builder addFlags(VMAAllocationCreateFlag... elements)
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VMAAllocationCreateInfo.Builder setFlags(java.lang.Iterable<VMAAllocationCreateFlag> 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 VMAAllocationCreateInfo.Builder addAllFlags(java.lang.Iterable<VMAAllocationCreateFlag> elements)
Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setUsage
public final VMAAllocationCreateInfo.Builder setUsage(VMAMemoryUsage usage)
Initializes the value for theusage
attribute.- Parameters:
usage
- The value for usage- Returns:
this
builder for use in a chained invocation
-
addRequiredFlags
public final VMAAllocationCreateInfo.Builder addRequiredFlags(VulkanMemoryPropertyFlag element)
Adds one element torequiredFlags
set.- Parameters:
element
- A requiredFlags element- Returns:
this
builder for use in a chained invocation
-
addRequiredFlags
public final VMAAllocationCreateInfo.Builder addRequiredFlags(VulkanMemoryPropertyFlag... elements)
Adds elements torequiredFlags
set.- Parameters:
elements
- An array of requiredFlags elements- Returns:
this
builder for use in a chained invocation
-
setRequiredFlags
public final VMAAllocationCreateInfo.Builder setRequiredFlags(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
Sets or replaces all elements forrequiredFlags
set.- Parameters:
elements
- An iterable of requiredFlags elements- Returns:
this
builder for use in a chained invocation
-
addAllRequiredFlags
public final VMAAllocationCreateInfo.Builder addAllRequiredFlags(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
Adds elements torequiredFlags
set.- Parameters:
elements
- An iterable of requiredFlags elements- Returns:
this
builder for use in a chained invocation
-
addPreferredFlags
public final VMAAllocationCreateInfo.Builder addPreferredFlags(VulkanMemoryPropertyFlag element)
Adds one element topreferredFlags
set.- Parameters:
element
- A preferredFlags element- Returns:
this
builder for use in a chained invocation
-
addPreferredFlags
public final VMAAllocationCreateInfo.Builder addPreferredFlags(VulkanMemoryPropertyFlag... elements)
Adds elements topreferredFlags
set.- Parameters:
elements
- An array of preferredFlags elements- Returns:
this
builder for use in a chained invocation
-
setPreferredFlags
public final VMAAllocationCreateInfo.Builder setPreferredFlags(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
Sets or replaces all elements forpreferredFlags
set.- Parameters:
elements
- An iterable of preferredFlags elements- Returns:
this
builder for use in a chained invocation
-
addAllPreferredFlags
public final VMAAllocationCreateInfo.Builder addAllPreferredFlags(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
Adds elements topreferredFlags
set.- Parameters:
elements
- An iterable of preferredFlags elements- Returns:
this
builder for use in a chained invocation
-
setMemoryTypeBits
public final VMAAllocationCreateInfo.Builder setMemoryTypeBits(long memoryTypeBits)
Initializes the value for thememoryTypeBits
attribute.- Parameters:
memoryTypeBits
- The value for memoryTypeBits- Returns:
this
builder for use in a chained invocation
-
build
public VMAAllocationCreateInfo build()
Builds a newVMAAllocationCreateInfo
.- Returns:
- An immutable instance of VMAAllocationCreateInfo
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-