Class Util


  • public final class Util
    extends Object
    • Method Detail

      • implode

        public static <T> String implode​(String glue,
                                         List<T> list)
        Joins a list of items to a single string using "glue" as separator If the item is null, it will add as empty
        Type Parameters:
        T - type of elements
        Parameters:
        glue - separator
        list - list of elements to be joined
        Returns:
        final string after concatenation
      • getDecimalPlaces

        public static int getDecimalPlaces​(String currency)
      • toIndentedString

        public static String toIndentedString​(Object o)
        Convert the given object to string with each line indented by 4 spaces (except the first line).
        Parameters:
        o - string
        Returns:
        string target "\n" replacement with "\n "
      • calculateSessionValidity

        public static String calculateSessionValidity()