Record Class UniqueIdBuilder
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.component.UniqueIdBuilder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUniqueIdBuilder(StringBuilder builder) Creates an instance of aUniqueIdBuilderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidappend(@Nullable net.minecraft.resources.ResourceKey<?> key) voidappend(@Nullable net.minecraft.resources.ResourceLocation id) voidbuild()builder()Returns the value of thebuilderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NON_W_PATTERN
-
MULTIPLE_UNDERSCORES_PATTERN
-
-
Constructor Details
-
UniqueIdBuilder
Creates an instance of aUniqueIdBuilderrecord class.- Parameters:
builder- the value for thebuilderrecord component
-
-
Method Details
-
appendSeparator
public void appendSeparator() -
append
-
append
public void append(@Nullable @Nullable net.minecraft.resources.ResourceLocation id) -
append
public void append(@Nullable @Nullable net.minecraft.resources.ResourceKey<?> key) -
build
-
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). -
builder
Returns the value of thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-