Class DisplayTool.Measurements

  • Enclosing class:
    DisplayTool

    public static class DisplayTool.Measurements
    extends java.lang.Object
    Measures the dimensions of the string given to its constructor. Height is the number of lines in the string. Width is the number of characters in the longest line.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int height  
      private int width  
    • Constructor Summary

      Constructors 
      Constructor Description
      Measurements​(java.lang.String s)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHeight()  
      int getWidth()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • height

        private int height
      • width

        private int width
    • Constructor Detail

      • Measurements

        public Measurements​(java.lang.String s)
    • Method Detail

      • getHeight

        public int getHeight()
      • getWidth

        public int getWidth()
      • toString

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