Record Class ModMismatchEvent.MismatchedVersionInfo
java.lang.Object
java.lang.Record
net.neoforged.neoforge.event.ModMismatchEvent.MismatchedVersionInfo
- Enclosing class:
ModMismatchEvent
public static record ModMismatchEvent.MismatchedVersionInfo(org.apache.maven.artifact.versioning.ArtifactVersion oldVersion, @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable org.apache.maven.artifact.versioning.ArtifactVersionThe field for thenewVersionrecord component.private final org.apache.maven.artifact.versioning.ArtifactVersionThe field for theoldVersionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMismatchedVersionInfo(org.apache.maven.artifact.versioning.ArtifactVersion oldVersion, @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion) Creates an instance of aMismatchedVersionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.boolean@Nullable org.apache.maven.artifact.versioning.ArtifactVersionReturns the value of thenewVersionrecord component.org.apache.maven.artifact.versioning.ArtifactVersionReturns the value of theoldVersionrecord component.final StringtoString()Returns a string representation of this record class.boolean
-
Field Details
-
oldVersion
private final org.apache.maven.artifact.versioning.ArtifactVersion oldVersionThe field for theoldVersionrecord component. -
newVersion
private final @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersionThe field for thenewVersionrecord component.
-
-
Constructor Details
-
MismatchedVersionInfo
public MismatchedVersionInfo(org.apache.maven.artifact.versioning.ArtifactVersion oldVersion, @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion) Creates an instance of aMismatchedVersionInforecord class.- Parameters:
oldVersion- the value for theoldVersionrecord componentnewVersion- the value for thenewVersionrecord component
-
-
Method Details
-
isMissing
public boolean isMissing() -
wasUpgrade
public boolean wasUpgrade() -
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 withObjects::equals(Object,Object). -
oldVersion
public org.apache.maven.artifact.versioning.ArtifactVersion oldVersion()Returns the value of theoldVersionrecord component.- Returns:
- the value of the
oldVersionrecord component
-
newVersion
public @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion()Returns the value of thenewVersionrecord component.- Returns:
- the value of the
newVersionrecord component
-