Class PadMessage


  • public class PadMessage
    extends java.lang.Object
    A message object that pads the output if the text is shorter than the given length. This is usefull when concating multiple messages, which should appear in a table like style.
    Author:
    Thomas Morgner
    • Constructor Summary

      Constructors 
      Constructor Description
      PadMessage​(java.lang.Object message, int length)
      Creates a new message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()
      Returns a string representation of the message.
      • Methods inherited from class java.lang.Object

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

      • PadMessage

        public PadMessage​(java.lang.Object message,
                          int length)
        Creates a new message.
        Parameters:
        message - the message.
        length - the padding size.
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns a string representation of the message.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string.