Record Class FEntityImpl

java.lang.Object
java.lang.Record
net.flectone.pulse.model.entity.FEntityImpl
Record Components:
name - the display name
uuid - the entity id
type - the entity type
showEntityName - the name shown on hover, or null to use the plain name
All Implemented Interfaces:
FEntity

public record FEntityImpl(String name, UUID uuid, String type, @Nullable net.kyori.adventure.text.Component showEntityName) extends Record implements FEntity
A non-player message sender.
  • Constructor Details

    • FEntityImpl

      public FEntityImpl(String name, UUID uuid, String type, @Nullable net.kyori.adventure.text.Component showEntityName)
      Creates an instance of a FEntityImpl record class.
      Parameters:
      name - the value for the name record component
      uuid - the value for the uuid record component
      type - the value for the type record component
      showEntityName - the value for the showEntityName record component
  • Method Details

    • equals

      public boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • builder

      public static FEntityImpl.FEntityImplBuilder builder()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • name

      public String name()
      Returns the value of the name record component.
      Specified by:
      name in interface FEntity
      Returns:
      the value of the name record component
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Specified by:
      uuid in interface FEntity
      Returns:
      the value of the uuid record component
    • type

      public String type()
      Returns the value of the type record component.
      Specified by:
      type in interface FEntity
      Returns:
      the value of the type record component
    • showEntityName

      public @Nullable net.kyori.adventure.text.Component showEntityName()
      Returns the value of the showEntityName record component.
      Specified by:
      showEntityName in interface FEntity
      Returns:
      the value of the showEntityName record component