Package kr.toxicity.model.api.bone
Record Class BoneName
java.lang.Object
java.lang.Record
kr.toxicity.model.api.bone.BoneName
- Record Components:
- tagsname- namerawName- original name
public record BoneName(@NotNull @Unmodifiable Set<BoneTag> tags, @NotNull String name, @NotNull String rawName)
extends Record
A tagged name of some bone
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull Stringname()Returns the value of thenamerecord component.static @NotNull BoneNameCreates a new BoneName by parsing the raw name string.@NotNull StringrawName()Returns the value of therawNamerecord component.booleanChecks this name has some tagstags()Returns the value of thetagsrecord component.@NotNull BoneItemMapperGets an item mapper of this bone name.@NotNull StringtoString()Returns a string representation of this record class.
-
Field Details
-
PARSER
A JSON deserializer for parsing BoneName from a string.- Since:
- 2.0.1
-
-
Constructor Details
-
Method Details
-
of
Creates a new BoneName by parsing the raw name string.- Parameters:
rawName- the raw string to parse- Returns:
- a parsed BoneName instance
- Since:
- 2.0.1
-
tagged
Checks this name has some tags- Parameters:
tags- tags- Returns:
- any match
-
toItemMapper
Gets an item mapper of this bone name.- Returns:
- item mapper
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
rawName
Returns the value of therawNamerecord component.- Returns:
- the value of the
rawNamerecord component
-