Record Class CLVersion
java.lang.Object
java.lang.Record
club.doki7.opencl.CLVersion
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionCLVersion
(int major, int minor, int patch) Creates an instance of aCLVersion
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull CLVersion
decode
(int version) int
encode()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
major()
Returns the value of themajor
record component.int
minor()
Returns the value of theminor
record component.int
patch()
Returns the value of thepatch
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
VERSION_MAJOR_BITS
public static final int VERSION_MAJOR_BITS- See Also:
-
VERSION_MINOR_BITS
public static final int VERSION_MINOR_BITS- See Also:
-
VERSION_PATCH_BITS
public static final int VERSION_PATCH_BITS- See Also:
-
VERSION_MAJOR_MASK
public static final int VERSION_MAJOR_MASK- See Also:
-
VERSION_MINOR_MASK
public static final int VERSION_MINOR_MASK- See Also:
-
VERSION_PATCH_MASK
public static final int VERSION_PATCH_MASK- See Also:
-
-
Constructor Details
-
CLVersion
public CLVersion(int major, int minor, int patch) Creates an instance of aCLVersion
record class.- Parameters:
major
- the value for themajor
record componentminor
- the value for theminor
record componentpatch
- the value for thepatch
record component
-
-
Method Details
-
decode
-
encode
public int encode() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecompare
method from their corresponding wrapper classes. -
major
public int major()Returns the value of themajor
record component.- Returns:
- the value of the
major
record component
-
minor
public int minor()Returns the value of theminor
record component.- Returns:
- the value of the
minor
record component
-
patch
public int patch()Returns the value of thepatch
record component.- Returns:
- the value of the
patch
record component
-