Record Class RecipeViewerEntryType.Component<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.viewer.RecipeViewerEntryType.Component<T>
- Enclosing class:
RecipeViewerEntryType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionempty()Returns the value of theemptyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.network.codec.StreamCodec<?, T> Returns the value of thestreamCodecrecord component.final StringtoString()Returns a string representation of this record class.dev.latvian.mods.rhino.type.TypeInfotype()Returns the value of thetyperecord component.
-
Constructor Details
-
Component
public Component(dev.latvian.mods.rhino.type.TypeInfo type, net.minecraft.network.codec.StreamCodec<?, T> streamCodec, Predicate<T> empty) Creates an instance of aComponentrecord class.- Parameters:
type- the value for thetyperecord componentstreamCodec- the value for thestreamCodecrecord componentempty- the value for theemptyrecord 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). -
type
public dev.latvian.mods.rhino.type.TypeInfo type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
streamCodec
Returns the value of thestreamCodecrecord component.- Returns:
- the value of the
streamCodecrecord component
-
empty
Returns the value of theemptyrecord component.- Returns:
- the value of the
emptyrecord component
-