Record Class IModFileInfo.LanguageSpec
java.lang.Object
java.lang.Record
net.neoforged.neoforgespi.language.IModFileInfo.LanguageSpec
- Enclosing interface:
IModFileInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable org.apache.maven.artifact.versioning.VersionRangeThe field for theacceptedVersionsrecord component.private final @Nullable StringThe field for thelanguageNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLanguageSpec(@Nullable String languageName, @Nullable org.apache.maven.artifact.versioning.VersionRange acceptedVersions) Creates an instance of aLanguageSpecrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.apache.maven.artifact.versioning.VersionRangeReturns the value of theacceptedVersionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thelanguageNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
languageName
The field for thelanguageNamerecord component. -
acceptedVersions
@Nullable private final @Nullable org.apache.maven.artifact.versioning.VersionRange acceptedVersionsThe field for theacceptedVersionsrecord component.
-
-
Constructor Details
-
LanguageSpec
public LanguageSpec(@Nullable @Nullable String languageName, @Nullable @Nullable org.apache.maven.artifact.versioning.VersionRange acceptedVersions) Creates an instance of aLanguageSpecrecord class.- Parameters:
languageName- the value for thelanguageNamerecord componentacceptedVersions- the value for theacceptedVersionsrecord component
-
-
Method Details
-
toString
Returns 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. -
hashCode
public 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. -
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). -
languageName
Returns the value of thelanguageNamerecord component.- Returns:
- the value of the
languageNamerecord component
-
acceptedVersions
@Nullable public @Nullable org.apache.maven.artifact.versioning.VersionRange acceptedVersions()Returns the value of theacceptedVersionsrecord component.- Returns:
- the value of the
acceptedVersionsrecord component
-