- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanClearRectangle
-
- All Implemented Interfaces:
VulkanClearRectangleType
public final class VulkanClearRectangle extends java.lang.Object implements VulkanClearRectangleType
Structure specifying a clear rectangle.- See Also:
- "VkClearRect"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanClearRectangle.Builder
Builds instances of typeVulkanClearRectangle
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
baseArrayLayer()
static VulkanClearRectangle.Builder
builder()
Creates a builder forVulkanClearRectangle
.static VulkanClearRectangle
copyOf(VulkanClearRectangleType instance)
Creates an immutable copy of aVulkanClearRectangleType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanClearRectangle
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:rectangle
,baseArrayLayer
,layerCount
.int
layerCount()
static VulkanClearRectangle
of(VulkanRectangle2D rectangle, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanClearRectangle
instance.VulkanRectangle2D
rectangle()
java.lang.String
toString()
Prints the immutable valueVulkanClearRectangle
with attribute values.VulkanClearRectangle
withBaseArrayLayer(int value)
Copy the current immutable object by setting a value for thebaseArrayLayer
attribute.VulkanClearRectangle
withLayerCount(int value)
Copy the current immutable object by setting a value for thelayerCount
attribute.VulkanClearRectangle
withRectangle(VulkanRectangle2D value)
Copy the current immutable object by setting a value for therectangle
attribute.
-
-
-
Method Detail
-
rectangle
public VulkanRectangle2D rectangle()
- Specified by:
rectangle
in interfaceVulkanClearRectangleType
- Returns:
- The two-dimensional region to be cleared.
-
baseArrayLayer
public int baseArrayLayer()
- Specified by:
baseArrayLayer
in interfaceVulkanClearRectangleType
- Returns:
- The first layer to be cleared.
-
layerCount
public int layerCount()
- Specified by:
layerCount
in interfaceVulkanClearRectangleType
- Returns:
- The number of layers to clear.
-
withRectangle
public final VulkanClearRectangle withRectangle(VulkanRectangle2D value)
Copy the current immutable object by setting a value for therectangle
attribute. 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
this
object
-
withBaseArrayLayer
public final VulkanClearRectangle withBaseArrayLayer(int value)
Copy the current immutable object by setting a value for thebaseArrayLayer
attribute. 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
this
object
-
withLayerCount
public final VulkanClearRectangle withLayerCount(int value)
Copy the current immutable object by setting a value for thelayerCount
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanClearRectangle
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:rectangle
,baseArrayLayer
,layerCount
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanClearRectangle
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanClearRectangle of(VulkanRectangle2D rectangle, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanClearRectangle
instance.- Parameters:
rectangle
- The value for therectangle
attributebaseArrayLayer
- The value for thebaseArrayLayer
attributelayerCount
- The value for thelayerCount
attribute- Returns:
- An immutable VulkanClearRectangle instance
-
copyOf
public static VulkanClearRectangle copyOf(VulkanClearRectangleType instance)
Creates an immutable copy of aVulkanClearRectangleType
value. 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
public static VulkanClearRectangle.Builder builder()
Creates a builder forVulkanClearRectangle
.- Returns:
- A new VulkanClearRectangle builder
-
-