Class VulkanVersion
java.lang.Object
com.io7m.jcoronado.api.VulkanVersion
- All Implemented Interfaces:
VulkanVersionType, Comparable<VulkanVersionType>
A Vulkan API version consisting of a major, minor, and patch component.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanVersion.Builderbuilder()Creates a builder forVulkanVersion.static VulkanVersioncopyOf(VulkanVersionType instance) Creates an immutable copy of aVulkanVersionTypevalue.booleanThis instance is equal to all instances ofVulkanVersionthat have equal attribute values.inthashCode()Computes a hash code from attributes:major,minor,patch.intmajor()intminor()intpatch()toString()Prints the immutable valueVulkanVersionwith attribute values.final VulkanVersionwithMajor(int value) Copy the current immutable object by setting a value for themajorattribute.final VulkanVersionwithMinor(int value) Copy the current immutable object by setting a value for theminorattribute.final VulkanVersionwithPatch(int value) Copy the current immutable object by setting a value for thepatchattribute.Methods inherited from interface VulkanVersionType
compareTo, toHumanString
-
Method Details
-
major
public int major()- Specified by:
majorin interfaceVulkanVersionType- Returns:
- The major version
-
minor
public int minor()- Specified by:
minorin interfaceVulkanVersionType- Returns:
- The minor version
-
patch
public int patch()- Specified by:
patchin interfaceVulkanVersionType- Returns:
- The patch version
-
withMajor
Copy the current immutable object by setting a value for themajorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for major- Returns:
- A modified copy or the
thisobject
-
withMinor
Copy the current immutable object by setting a value for theminorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minor- Returns:
- A modified copy or the
thisobject
-
withPatch
Copy the current immutable object by setting a value for thepatchattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for patch- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanVersionTypevalue. 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 VulkanVersion instance
-
builder
Creates a builder forVulkanVersion.VulkanVersion.builder() .setMajor(int) // optional
major.setMinor(int) // optionalminor.setPatch(int) // optionalpatch.build();- Returns:
- A new VulkanVersion builder
-