Record Class ClassFileVersion
java.lang.Object
java.lang.Record
dev.archunitjava.model.ClassFileVersion
- All Implemented Interfaces:
Comparable<ClassFileVersion>
public record ClassFileVersion(int major, int minor)
extends Record
implements Comparable<ClassFileVersion>
Lossless JVM class-file version tuple.
-
Constructor Summary
ConstructorsConstructorDescriptionClassFileVersion(int major, int minor) Creates an instance of aClassFileVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ClassFileVersion other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassFileVersion
public ClassFileVersion(int major, int minor) Creates an instance of aClassFileVersionrecord class.- Parameters:
major- the value for themajorrecord componentminor- the value for theminorrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ClassFileVersion>
-
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 thecomparemethod from their corresponding wrapper classes. -
major
public int major()Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-
minor
public int minor()Returns the value of theminorrecord component.- Returns:
- the value of the
minorrecord component
-