Class FormatUtils


  • public class FormatUtils
    extends Object
    Utility to format CLI output.
    • Method Detail

      • printAttributeValues

        public static String printAttributeValues​(String template,
                                                  Map attributeValues,
                                                  Set passwords)
      • printAttributeValues

        public static String printAttributeValues​(String template,
                                                  Map attributeValues)
      • formatProperties

        public static String formatProperties​(Map prop)
      • formatMap

        public static String formatMap​(String keyLabel,
                                       String propLabel,
                                       Map map)
        Returns a formatted string. Given a map, a key and value label. Tabulates the keys and values in the map in this manner.
         keyLabel       propLabel
         -------------- --------------
         key1           value1
         key2           value2
         keyN           valueN
         
        Parameters:
        keyLabel - Label for the key column.
        propLabel - Label for the value column.
        map - Map that contains the information.
        Returns:
        a formatted string of a map.