Record Class JavaBlockItem
java.lang.Object
java.lang.Record
org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockItem
-
Constructor Summary
ConstructorsConstructorDescriptionJavaBlockItem(@NonNull String identifier, @org.checkerframework.checker.index.qual.NonNegative int javaId, @org.checkerframework.checker.index.qual.NonNegative int stackSize)Creates an instance of aJavaBlockItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NonNull StringReturns the value of theidentifierrecord component.@org.checkerframework.checker.index.qual.NonNegative intjavaId()Returns the value of thejavaIdrecord component.@org.checkerframework.checker.index.qual.NonNegative intReturns the value of thestackSizerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
JavaBlockItem
public JavaBlockItem(@NonNull String identifier, @org.checkerframework.checker.index.qual.NonNegative int javaId, @org.checkerframework.checker.index.qual.NonNegative int stackSize)Creates an instance of aJavaBlockItemrecord class.- Parameters:
identifier- the value for theidentifierrecord componentjavaId- the value for thejavaIdrecord componentstackSize- the value for thestackSizerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
javaId
public @org.checkerframework.checker.index.qual.NonNegative int javaId()Returns the value of thejavaIdrecord component.- Returns:
- the value of the
javaIdrecord component
-
stackSize
public @org.checkerframework.checker.index.qual.NonNegative int stackSize()Returns the value of thestackSizerecord component.- Returns:
- the value of the
stackSizerecord component
-