- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanOffset3D
-
- All Implemented Interfaces:
VulkanOffset3DType
public final class VulkanOffset3D extends java.lang.Object implements VulkanOffset3DType
Structure specifying a three-dimensional offset.- See Also:
- "VkOffset3D"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanOffset3D.Builder
Builds instances of typeVulkanOffset3D
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanOffset3D.Builder
builder()
Creates a builder forVulkanOffset3D
.static VulkanOffset3D
copyOf(VulkanOffset3DType instance)
Creates an immutable copy of aVulkanOffset3DType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanOffset3D
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:x
,y
,z
.static VulkanOffset3D
of(int x, int y, int z)
Construct a new immutableVulkanOffset3D
instance.java.lang.String
toString()
Prints the immutable valueVulkanOffset3D
with attribute values.VulkanOffset3D
withX(int value)
Copy the current immutable object by setting a value for thex
attribute.VulkanOffset3D
withY(int value)
Copy the current immutable object by setting a value for they
attribute.VulkanOffset3D
withZ(int value)
Copy the current immutable object by setting a value for thez
attribute.int
x()
int
y()
int
z()
-
-
-
Method Detail
-
x
public int x()
- Specified by:
x
in interfaceVulkanOffset3DType
- Returns:
- The x offset
-
y
public int y()
- Specified by:
y
in interfaceVulkanOffset3DType
- Returns:
- The y offset
-
z
public int z()
- Specified by:
z
in interfaceVulkanOffset3DType
- Returns:
- The z offset
-
withX
public final VulkanOffset3D withX(int value)
Copy the current immutable object by setting a value for thex
attribute. 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 of the
this
object
-
withY
public final VulkanOffset3D withY(int value)
Copy the current immutable object by setting a value for they
attribute. 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 of the
this
object
-
withZ
public final VulkanOffset3D withZ(int value)
Copy the current immutable object by setting a value for thez
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for z- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanOffset3D
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:x
,y
,z
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanOffset3D
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanOffset3D of(int x, int y, int z)
Construct a new immutableVulkanOffset3D
instance.- Parameters:
x
- The value for thex
attributey
- The value for they
attributez
- The value for thez
attribute- Returns:
- An immutable VulkanOffset3D instance
-
copyOf
public static VulkanOffset3D copyOf(VulkanOffset3DType instance)
Creates an immutable copy of aVulkanOffset3DType
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 VulkanOffset3D instance
-
builder
public static VulkanOffset3D.Builder builder()
Creates a builder forVulkanOffset3D
.- Returns:
- A new VulkanOffset3D builder
-
-