Class VulkanInstanceCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanInstanceCreateInfo.Builder
- Enclosing class:
VulkanInstanceCreateInfo
Builds instances of type
VulkanInstanceCreateInfo
.
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 TypeMethodDescriptionaddAllEnabledExtensions
(Iterable<String> elements) Adds elements toenabledExtensions
set.addAllEnabledLayers
(Iterable<String> elements) Adds elements toenabledLayers
set.addAllExtensionInfo
(Iterable<? extends VulkanInstanceExtensionInfoType> elements) Adds elements toextensionInfo
list.addEnabledExtensions
(String element) Adds one element toenabledExtensions
set.addEnabledExtensions
(String... elements) Adds elements toenabledExtensions
set.addEnabledLayers
(String element) Adds one element toenabledLayers
set.addEnabledLayers
(String... elements) Adds elements toenabledLayers
set.Adds one element toextensionInfo
list.addExtensionInfo
(VulkanInstanceExtensionInfoType... elements) Adds elements toextensionInfo
list.build()
Builds a newVulkanInstanceCreateInfo
.from
(VulkanInstanceCreateInfoType instance) Fill a builder with attribute values from the providedVulkanInstanceCreateInfoType
instance.setApplicationInfo
(VulkanApplicationInfo applicationInfo) Initializes the value for theapplicationInfo
attribute.setEnabledExtensions
(Iterable<String> elements) Sets or replaces all elements forenabledExtensions
set.setEnabledLayers
(Iterable<String> elements) Sets or replaces all elements forenabledLayers
set.setExtensionInfo
(Iterable<? extends VulkanInstanceExtensionInfoType> elements) Sets or replaces all elements forextensionInfo
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanInstanceCreateInfoType
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
-
setApplicationInfo
public final VulkanInstanceCreateInfo.Builder setApplicationInfo(VulkanApplicationInfo applicationInfo) Initializes the value for theapplicationInfo
attribute.- Parameters:
applicationInfo
- The value for applicationInfo- Returns:
this
builder for use in a chained invocation
-
addEnabledExtensions
Adds one element toenabledExtensions
set.- Parameters:
element
- A enabledExtensions element- Returns:
this
builder for use in a chained invocation
-
addEnabledExtensions
Adds elements toenabledExtensions
set.- Parameters:
elements
- An array of enabledExtensions elements- Returns:
this
builder for use in a chained invocation
-
setEnabledExtensions
Sets or replaces all elements forenabledExtensions
set.- Parameters:
elements
- An iterable of enabledExtensions elements- Returns:
this
builder for use in a chained invocation
-
addAllEnabledExtensions
Adds elements toenabledExtensions
set.- Parameters:
elements
- An iterable of enabledExtensions elements- Returns:
this
builder for use in a chained invocation
-
addEnabledLayers
Adds one element toenabledLayers
set.- Parameters:
element
- A enabledLayers element- Returns:
this
builder for use in a chained invocation
-
addEnabledLayers
Adds elements toenabledLayers
set.- Parameters:
elements
- An array of enabledLayers elements- Returns:
this
builder for use in a chained invocation
-
setEnabledLayers
Sets or replaces all elements forenabledLayers
set.- Parameters:
elements
- An iterable of enabledLayers elements- Returns:
this
builder for use in a chained invocation
-
addAllEnabledLayers
Adds elements toenabledLayers
set.- Parameters:
elements
- An iterable of enabledLayers elements- Returns:
this
builder for use in a chained invocation
-
addExtensionInfo
public final VulkanInstanceCreateInfo.Builder addExtensionInfo(VulkanInstanceExtensionInfoType element) Adds one element toextensionInfo
list.- Parameters:
element
- A extensionInfo element- Returns:
this
builder for use in a chained invocation
-
addExtensionInfo
public final VulkanInstanceCreateInfo.Builder addExtensionInfo(VulkanInstanceExtensionInfoType... elements) Adds elements toextensionInfo
list.- Parameters:
elements
- An array of extensionInfo elements- Returns:
this
builder for use in a chained invocation
-
setExtensionInfo
public final VulkanInstanceCreateInfo.Builder setExtensionInfo(Iterable<? extends VulkanInstanceExtensionInfoType> elements) Sets or replaces all elements forextensionInfo
list.- Parameters:
elements
- An iterable of extensionInfo elements- Returns:
this
builder for use in a chained invocation
-
addAllExtensionInfo
public final VulkanInstanceCreateInfo.Builder addAllExtensionInfo(Iterable<? extends VulkanInstanceExtensionInfoType> elements) Adds elements toextensionInfo
list.- Parameters:
elements
- An iterable of extensionInfo elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanInstanceCreateInfo
.- Returns:
- An immutable instance of VulkanInstanceCreateInfo
- Throws:
IllegalStateException
- if any required attributes are missing
-