Package com.marcpg.libpg.web.discord
Record Class Embed.Footer
java.lang.Object
java.lang.Record
com.marcpg.libpg.web.discord.Embed.Footer
- Record Components:
text
- The plaintext that on the footer. Can be called the main component of the footer.iconUrl
- The little mini-icon that appears besides the footer.
- Enclosing class:
- Embed
Represents the footer information of an embed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
build()
Formats the footer into a compact representation in JSON, which is required for sending it to the Discord API.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.iconUrl()
Returns the value of theiconUrl
record component.boolean
isEmpty()
Checks if the footer is empty.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
isEmpty
public boolean isEmpty()Checks if the footer is empty. This doesn't only include if the values arenull
, but also if they are empty/blank.- Returns:
true
if the footer is empty,false
otherwise.
-
build
Formats the footer into a compact representation in JSON, which is required for sending it to the Discord API.- Returns:
- The formatted JSON representation.
-
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)
. -
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
iconUrl
Returns the value of theiconUrl
record component.- Returns:
- the value of the
iconUrl
record component
-