Class LabelWrapper

  • All Implemented Interfaces:
    org.apache.commons.collections4.Transformer<java.lang.String,​java.lang.String>

    public class LabelWrapper
    extends java.lang.Object
    implements org.apache.commons.collections4.Transformer<java.lang.String,​java.lang.String>
    A utility to wrap long lines, creating html strings with line breaks at a settable max line length
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String breaker  
    • Constructor Summary

      Constructors 
      Constructor Description
      LabelWrapper()
      Create an instance with default line break length = 10
      LabelWrapper​(int lineLength)
      Create an instance with passed line break length
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      java.lang.String transform​(java.lang.String str)
      call 'wrap' to transform the passed String
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LabelWrapper

        public LabelWrapper()
        Create an instance with default line break length = 10
      • LabelWrapper

        public LabelWrapper​(int lineLength)
        Create an instance with passed line break length
        Parameters:
        lineLength - the max length for lines
    • Method Detail

      • transform

        public java.lang.String transform​(java.lang.String str)
        call 'wrap' to transform the passed String
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<java.lang.String,​java.lang.String>
      • main

        public static void main​(java.lang.String[] args)