Class MultilineUtil


  • public class MultilineUtil
    extends java.lang.Object
    Helper class to deal with swift fields that allow many lines of text
    • Constructor Summary

      Constructors 
      Constructor Description
      MultilineUtil()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] removeInnerEmptyLines​(java.lang.String[] lines)
      Same as removeInnerEmptyLines(lines, false)
      java.lang.String[] removeInnerEmptyLines​(java.lang.String[] lines, boolean keepAll)
      Helper method to remove empty lines on a multiline field.
      • Methods inherited from class java.lang.Object

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

      • MultilineUtil

        public MultilineUtil()
    • Method Detail

      • removeInnerEmptyLines

        public java.lang.String[] removeInnerEmptyLines​(java.lang.String[] lines)
        Same as removeInnerEmptyLines(lines, false)
        Returns:
        a String array with all nonempty lines contained in the lines array
        See Also:
        removeInnerEmptyLines(String[], boolean)
      • removeInnerEmptyLines

        public java.lang.String[] removeInnerEmptyLines​(java.lang.String[] lines,
                                                        boolean keepAll)
        Helper method to remove empty lines on a multiline field.
        Parameters:
        lines - an non null array of lines to process
        keepAll - if true this method will have the effect of sorting empty lines to the end, if false, empty lines will be removed
        Returns:
        a String array with all nonempty lines contained in the lines array, the string may be empty if lines is empty, or no non-empty lines are present