Package picocli

Class CommandLine.AbbreviationMatcher

  • Enclosing class:
    CommandLine

    static class CommandLine.AbbreviationMatcher
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean isNonAlphabetic​(java.lang.String str)  
      private static java.lang.String makeCanonical​(java.lang.String str)  
      static java.lang.String match​(java.util.Set<java.lang.String> set, java.lang.String abbreviation, boolean caseInsensitive, CommandLine source)
      Returns the non-abbreviated name if found, otherwise returns the specified original abbreviation value.
      private static boolean matchKeyChunks​(java.util.List<java.lang.String> abbreviatedKeyChunks, java.util.List<java.lang.String> keyChunks, boolean caseInsensitive)  
      static java.util.List<java.lang.String> splitIntoChunks​(java.lang.String command, boolean caseInsensitive)  
      private static boolean startsWith​(java.lang.String str, java.lang.String prefix, boolean caseInsensitive)  
      • Methods inherited from class java.lang.Object

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

      • AbbreviationMatcher

        AbbreviationMatcher()
    • Method Detail

      • splitIntoChunks

        public static java.util.List<java.lang.String> splitIntoChunks​(java.lang.String command,
                                                                       boolean caseInsensitive)
      • makeCanonical

        private static java.lang.String makeCanonical​(java.lang.String str)
      • match

        public static java.lang.String match​(java.util.Set<java.lang.String> set,
                                             java.lang.String abbreviation,
                                             boolean caseInsensitive,
                                             CommandLine source)
        Returns the non-abbreviated name if found, otherwise returns the specified original abbreviation value.
      • matchKeyChunks

        private static boolean matchKeyChunks​(java.util.List<java.lang.String> abbreviatedKeyChunks,
                                              java.util.List<java.lang.String> keyChunks,
                                              boolean caseInsensitive)
      • startsWith

        private static boolean startsWith​(java.lang.String str,
                                          java.lang.String prefix,
                                          boolean caseInsensitive)
      • isNonAlphabetic

        private static boolean isNonAlphabetic​(java.lang.String str)