Class Utils

  • public class Utils
    extends Object
    • Field Detail

    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • stripFileExtension

        public static String stripFileExtension​(String name)
      • sortLinesInString

        public static String sortLinesInString​(String s)
      • writeSerializedATNIntegerHistogram

        public static void writeSerializedATNIntegerHistogram​(String filename,
                                                              IntegerList serializedATN)
      • capitalize

        public static String capitalize​(String s)
      • decapitalize

        public static String decapitalize​(String s)
      • select

        public static <From,​To> List<To> select​(List<From> list,
                                                      Utils.Func1<From,​To> selector)
        apply methodName to list and return list of results. method has no args. This pulls data out of a list essentially.
      • find

        public static <T> T find​(List<?> ops,
                                 Class<T> cl)
        Find exact object type or subclass of cl in list
      • indexOf

        public static <T> int indexOf​(List<? extends T> elems,
                                      Utils.Filter<T> filter)
      • lastIndexOf

        public static <T> int lastIndexOf​(List<? extends T> elems,
                                          Utils.Filter<T> filter)
      • setSize

        public static void setSize​(List<?> list,
                                   int size)