Package net.minecraftforge.event
Record Class ModMismatchEvent.MismatchedVersionInfo
java.lang.Object
java.lang.Record
net.minecraftforge.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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionMismatchedVersionInfo(org.apache.maven.artifact.versioning.ArtifactVersion oldVersion, @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion) Creates an instance of aMismatchedVersionInforecord class.
- 
Method SummaryModifier 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- 
oldVersionprivate final org.apache.maven.artifact.versioning.ArtifactVersion oldVersionThe field for theoldVersionrecord component.
- 
newVersion@Nullable private final @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersionThe field for thenewVersionrecord component.
 
- 
- 
Constructor Details- 
MismatchedVersionInfopublic MismatchedVersionInfo(org.apache.maven.artifact.versioning.ArtifactVersion oldVersion, @Nullable @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion) Creates an instance of aMismatchedVersionInforecord class.- Parameters:
- oldVersion- the value for the- oldVersionrecord component
- newVersion- the value for the- newVersionrecord component
 
 
- 
- 
Method Details- 
isMissingpublic boolean isMissing()
- 
wasUpgradepublic boolean wasUpgrade()
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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).
- 
oldVersionpublic org.apache.maven.artifact.versioning.ArtifactVersion oldVersion()Returns the value of theoldVersionrecord component.- Returns:
- the value of the oldVersionrecord component
 
- 
newVersion@Nullable public @Nullable org.apache.maven.artifact.versioning.ArtifactVersion newVersion()Returns the value of thenewVersionrecord component.- Returns:
- the value of the newVersionrecord component
 
 
-