Class VulkanExtent2D
java.lang.Object
com.io7m.jcoronado.api.VulkanExtent2D
- All Implemented Interfaces:
VulkanExtent2DType
Structure specifying a two-dimensional extent.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanExtent2D.Builderbuilder()Creates a builder forVulkanExtent2D.static VulkanExtent2DcopyOf(VulkanExtent2DType instance) Creates an immutable copy of aVulkanExtent2DTypevalue.booleanThis instance is equal to all instances ofVulkanExtent2Dthat have equal attribute values.inthashCode()Computes a hash code from attributes:width,height.intheight()static VulkanExtent2Dof(int width, int height) Construct a new immutableVulkanExtent2Dinstance.toString()Prints the immutable valueVulkanExtent2Dwith attribute values.intwidth()final VulkanExtent2DwithHeight(int value) Copy the current immutable object by setting a value for theheightattribute.final VulkanExtent2DwithWidth(int value) Copy the current immutable object by setting a value for thewidthattribute.
-
Method Details
-
width
public int width()- Specified by:
widthin interfaceVulkanExtent2DType- Returns:
- The width of the extent
-
height
public int height()- Specified by:
heightin interfaceVulkanExtent2DType- Returns:
- The height of the extent
-
withWidth
Copy the current immutable object by setting a value for thewidthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for width- Returns:
- A modified copy of the
thisobject
-
withHeight
Copy the current immutable object by setting a value for theheightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for height- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
Construct a new immutableVulkanExtent2Dinstance.- Parameters:
width- The value for thewidthattributeheight- The value for theheightattribute- Returns:
- An immutable VulkanExtent2D instance
-
copyOf
Creates an immutable copy of aVulkanExtent2DTypevalue. 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 VulkanExtent2D instance
-
builder
Creates a builder forVulkanExtent2D.VulkanExtent2D.builder() .setWidth(int) // requiredwidth.setHeight(int) // requiredheight.build();- Returns:
- A new VulkanExtent2D builder
-