Class TextBlock

  • All Implemented Interfaces:
    Block

    class TextBlock
    extends java.lang.Object
    implements Block
    Block that holds plain text
    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String text
      the text
    • Constructor Summary

      Constructors 
      Constructor Description
      TextBlock​(java.lang.String text)
      Creates the TextBlock.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      (package private) java.lang.String getText()
      Returns the text.
      int hashCode()
      java.lang.String toString()
      void traverse​(Sink sink)
      Traverse the block
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • text

        private final java.lang.String text
        the text
    • Constructor Detail

      • TextBlock

        TextBlock​(java.lang.String text)
        Creates the TextBlock.
        Parameters:
        text - some text. can't ben null
        Throws:
        java.lang.IllegalArgumentException - if parameters are not in the domain
    • Method Detail

      • traverse

        public final void traverse​(Sink sink)
        Traverse the block
        Specified by:
        traverse in interface Block
        Parameters:
        sink - the sink that travers
      • toString

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

        final java.lang.String getText()
        Returns the text.
        Returns:
        String with the text.
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object