Klasse NoSpaceTextPart

Object
de.sayayi.lib.message.internal.part.NoSpaceTextPart
Alle implementierten Schnittstellen:
MessagePart, MessagePart.Text, SpacesAware

public final class NoSpaceTextPart extends Object implements MessagePart.Text
Text message part without leading and trailing spaces.
Seit:
0.5.0
  • Konstruktordetails

    • NoSpaceTextPart

      public NoSpaceTextPart(@NotNull @NotNull String text)
      Constructs a text part without leading/trailing spaces. If text contains leading and/or trailing spaces, they will be removed.
      Parameter:
      text - text, not null
  • Methodendetails

    • getText

      @NotNull public @NotNull String getText()
      Beschreibung aus Schnittstelle kopiert: MessagePart.Text
      Returns the trimmed text for this message part.
      Angegeben von:
      getText in Schnittstelle MessagePart.Text
      Gibt zurück:
      trimmed text or null
    • getTextWithSpaces

      @NotNull public @NotNull String getTextWithSpaces()
      Beschreibung aus Schnittstelle kopiert: MessagePart.Text
      Returns the text for this message part decorated with spaces, if available. If the message text is null an empty string is returned.
      Angegeben von:
      getTextWithSpaces in Schnittstelle MessagePart.Text
      Gibt zurück:
      text, never null
    • isEmpty

      public boolean isEmpty()
      Beschreibung aus Schnittstelle kopiert: MessagePart.Text
      Tells if this text message part is empty.
      Angegeben von:
      isEmpty in Schnittstelle MessagePart.Text
      Gibt zurück:
      true if this message part is empty, false otherwise
    • isSpaceBefore

      public boolean isSpaceBefore()
      Tells whether this message has a leading space.
      Angegeben von:
      isSpaceBefore in Schnittstelle SpacesAware
      Gibt zurück:
      always false
    • isSpaceAfter

      public boolean isSpaceAfter()
      Tells whether this message has a trailing space.
      Angegeben von:
      isSpaceAfter in Schnittstelle SpacesAware
      Gibt zurück:
      always false
    • isSpaceAround

      public boolean isSpaceAround()
      Tells whether this message has a leading and trailing space.
      Angegeben von:
      isSpaceAround in Schnittstelle SpacesAware
      Gibt zurück:
      always false
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      @Contract(pure=true) public String toString()
      Setzt außer Kraft:
      toString in Klasse Object