Class VulkanRectangle2D
java.lang.Object
com.io7m.jcoronado.api.VulkanRectangle2D
- All Implemented Interfaces:
VulkanRectangle2DType
Structure specifying a two-dimensional subregion.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface VulkanRectangle2DType
ZERO -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanRectangle2D.Builderbuilder()Creates a builder forVulkanRectangle2D.static VulkanRectangle2DcopyOf(VulkanRectangle2DType instance) Creates an immutable copy of aVulkanRectangle2DTypevalue.booleanThis instance is equal to all instances ofVulkanRectangle2Dthat have equal attribute values.extent()inthashCode()Computes a hash code from attributes:offset,extent.offset()toString()Prints the immutable valueVulkanRectangle2Dwith attribute values.final VulkanRectangle2DwithExtent(VulkanExtent2D value) Copy the current immutable object by setting a value for theextentattribute.final VulkanRectangle2DwithOffset(VulkanOffset2D value) Copy the current immutable object by setting a value for theoffsetattribute.
-
Method Details
-
offset
- Specified by:
offsetin interfaceVulkanRectangle2DType- Returns:
- The offset
-
extent
- Specified by:
extentin interfaceVulkanRectangle2DType- Returns:
- The extent
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for offset- Returns:
- A modified copy or the
thisobject
-
withExtent
Copy the current immutable object by setting a value for theextentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for extent- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanRectangle2DTypevalue. 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 VulkanRectangle2D instance
-
builder
Creates a builder forVulkanRectangle2D.VulkanRectangle2D.builder() .setOffset(com.io7m.jcoronado.api.VulkanOffset2D) // optional
offset.setExtent(com.io7m.jcoronado.api.VulkanExtent2D) // optionalextent.build();- Returns:
- A new VulkanRectangle2D builder
-