Record Class TextQuote
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.TextQuote
- All Implemented Interfaces:
Serializable,ApiResult
public record TextQuote(@NotNull String text, @Nullable MessageEntity[] entities, int position, boolean isManual)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTextQuote(@NotNull String text, @Nullable MessageEntity[] entities, int position, boolean isManual) Creates an instance of aTextQuoterecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable MessageEntity[]entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisManual()Returns the value of theisManualrecord component.intposition()Returns the value of thepositionrecord component.@NotNull Stringtext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextQuote
public TextQuote(@NotNull @NotNull String text, @Nullable @Nullable MessageEntity[] entities, int position, boolean isManual) Creates an instance of aTextQuoterecord class.- Parameters:
text- the value for thetextrecord componententities- the value for theentitiesrecord componentposition- the value for thepositionrecord componentisManual- the value for theisManualrecord 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 '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
entities
Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
isManual
public boolean isManual()Returns the value of theisManualrecord component.- Returns:
- the value of the
isManualrecord component
-