Record Class ModuleReferenceHolder
java.lang.Object
java.lang.Record
mods.thecomputerizer.theimpossiblelibrary.neoforge.core.modules.ModuleReferenceHolder
public record ModuleReferenceHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module, mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference)
extends Record
Simple holder class for a ModuleReference and its corresponding Module
-
Constructor Summary
ConstructorsConstructorDescriptionModuleReferenceHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module, mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference) Creates an instance of aModuleReferenceHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleDescriptorAccessgetName()final inthashCode()Returns a hash code value for this object.mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccessmodule()Returns the value of themodulerecord component.static ModuleReferenceHolderof(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module, mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference) mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccessReturns the value of thereferencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModuleReferenceHolder
public ModuleReferenceHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module, mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference) Creates an instance of aModuleReferenceHolderrecord class.- Parameters:
module- the value for themodulerecord componentreference- the value for thereferencerecord component
-
-
Method Details
-
of
public static ModuleReferenceHolder of(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module, mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference) -
getDescriptor
public mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleDescriptorAccess getDescriptor() -
getLocation
-
getName
-
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). -
module
public mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleAccess module()Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-
reference
public mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ModuleReferenceAccess reference()Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-