Class VulkanClearRectangle
java.lang.Object
com.io7m.jcoronado.api.VulkanClearRectangle
- All Implemented Interfaces:
VulkanClearRectangleType
Structure specifying a clear rectangle.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanClearRectangle. -
Method Summary
Modifier and TypeMethodDescriptionintstatic VulkanClearRectangle.Builderbuilder()Creates a builder forVulkanClearRectangle.static VulkanClearRectanglecopyOf(VulkanClearRectangleType instance) Creates an immutable copy of aVulkanClearRectangleTypevalue.booleanThis instance is equal to all instances ofVulkanClearRectanglethat have equal attribute values.inthashCode()Computes a hash code from attributes:rectangle,baseArrayLayer,layerCount.intstatic VulkanClearRectangleof(VulkanRectangle2D rectangle, int baseArrayLayer, int layerCount) Construct a new immutableVulkanClearRectangleinstance.toString()Prints the immutable valueVulkanClearRectanglewith attribute values.final VulkanClearRectanglewithBaseArrayLayer(int value) Copy the current immutable object by setting a value for thebaseArrayLayerattribute.final VulkanClearRectanglewithLayerCount(int value) Copy the current immutable object by setting a value for thelayerCountattribute.final VulkanClearRectanglewithRectangle(VulkanRectangle2D value) Copy the current immutable object by setting a value for therectangleattribute.
-
Method Details
-
rectangle
- Specified by:
rectanglein interfaceVulkanClearRectangleType- Returns:
- The two-dimensional region to be cleared.
-
baseArrayLayer
public int baseArrayLayer()- Specified by:
baseArrayLayerin interfaceVulkanClearRectangleType- Returns:
- The first layer to be cleared.
-
layerCount
public int layerCount()- Specified by:
layerCountin interfaceVulkanClearRectangleType- Returns:
- The number of layers to clear.
-
withRectangle
Copy the current immutable object by setting a value for therectangleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rectangle- Returns:
- A modified copy of the
thisobject
-
withBaseArrayLayer
Copy the current immutable object by setting a value for thebaseArrayLayerattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseArrayLayer- Returns:
- A modified copy of the
thisobject
-
withLayerCount
Copy the current immutable object by setting a value for thelayerCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for layerCount- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanClearRectangle of(VulkanRectangle2D rectangle, int baseArrayLayer, int layerCount) Construct a new immutableVulkanClearRectangleinstance.- Parameters:
rectangle- The value for therectangleattributebaseArrayLayer- The value for thebaseArrayLayerattributelayerCount- The value for thelayerCountattribute- Returns:
- An immutable VulkanClearRectangle instance
-
copyOf
Creates an immutable copy of aVulkanClearRectangleTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VulkanClearRectangle instance
-
builder
Creates a builder forVulkanClearRectangle.VulkanClearRectangle.builder() .setRectangle(com.io7m.jcoronado.api.VulkanRectangle2D) // requiredrectangle.setBaseArrayLayer(int) // optionalbaseArrayLayer.setLayerCount(int) // optionallayerCount.build();- Returns:
- A new VulkanClearRectangle builder
-