Class VulkanOffset2D
java.lang.Object
com.io7m.jcoronado.api.VulkanOffset2D
- All Implemented Interfaces:
VulkanOffset2DType
Structure specifying a two-dimensional offset.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface VulkanOffset2DType
ZERO -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanOffset2D.Builderbuilder()Creates a builder forVulkanOffset2D.static VulkanOffset2DcopyOf(VulkanOffset2DType instance) Creates an immutable copy of aVulkanOffset2DTypevalue.booleanThis instance is equal to all instances ofVulkanOffset2Dthat have equal attribute values.inthashCode()Computes a hash code from attributes:x,y.toString()Prints the immutable valueVulkanOffset2Dwith attribute values.final VulkanOffset2DwithX(int value) Copy the current immutable object by setting a value for thexattribute.final VulkanOffset2DwithY(int value) Copy the current immutable object by setting a value for theyattribute.intx()inty()
-
Method Details
-
x
public int x()- Specified by:
xin interfaceVulkanOffset2DType- Returns:
- The x offset
-
y
public int y()- Specified by:
yin interfaceVulkanOffset2DType- Returns:
- The y offset
-
withX
Copy the current immutable object by setting a value for thexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x- Returns:
- A modified copy or the
thisobject
-
withY
Copy the current immutable object by setting a value for theyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for y- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanOffset2DTypevalue. 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 VulkanOffset2D instance
-
builder
Creates a builder forVulkanOffset2D.VulkanOffset2D.builder() .setX(int) // optional
x.setY(int) // optionaly.build();- Returns:
- A new VulkanOffset2D builder
-