Class TextComponent

java.lang.Object
de.calamanari.pk.command.TextComponent

public class TextComponent
extends java.lang.Object
Text Component - the RECEIVER in this COMMAND example.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    TextComponent()  
  • Method Summary

    Modifier and Type Method Description
    TextComponent append​(java.lang.String str)
    appends the given string to the internal buffer
    int length()
    Returns current size of text, number of characters
    void setLength​(int newLength)
    Sets the new length of the internal buffer
    java.lang.String substring​(int start)
    Returns a string containing the string copied beginning with the given position
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • length

      public int length()
      Returns current size of text, number of characters
      Returns:
      length
    • setLength

      public void setLength​(int newLength)
      Sets the new length of the internal buffer
      Parameters:
      newLength - length to be set
    • append

      public TextComponent append​(java.lang.String str)
      appends the given string to the internal buffer
      Parameters:
      str - string to be appended
      Returns:
      this instance
    • substring

      public java.lang.String substring​(int start)
      Returns a string containing the string copied beginning with the given position
      Parameters:
      start - first character to be copied
      Returns:
      string
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object