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()static VulkanVersionof(int major, int minor, int patch) Construct a new immutableVulkanVersioninstance.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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jcoronado.api.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 of 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 of 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 of the
thisobject
-
equals
-
hashCode
-
toString
-
of
Construct a new immutableVulkanVersioninstance.- Parameters:
major- The value for themajorattributeminor- The value for theminorattributepatch- The value for thepatchattribute- Returns:
- An immutable VulkanVersion instance
-
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) // requiredmajor.setMinor(int) // requiredminor.setPatch(int) // requiredpatch.build();- Returns:
- A new VulkanVersion builder
-