Class SortedAggregateCompleter

  • All Implemented Interfaces:
    jline.console.completer.Completer

    public class SortedAggregateCompleter
    extends java.lang.Object
    implements jline.console.completer.Completer
    Copied from jline AggregateCompleter sorts aggregated completions
    • Constructor Summary

      Constructors 
      Constructor Description
      SortedAggregateCompleter()  
      SortedAggregateCompleter​(java.util.Collection<jline.console.completer.Completer> completers)
      Construct an AggregateCompleter with the given collection of completers.
      SortedAggregateCompleter​(jline.console.completer.Completer... completers)
      Construct an AggregateCompleter with the given completers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int complete​(java.lang.String buffer, int cursor, java.util.List<java.lang.CharSequence> candidates)
      Perform a completion operation across all aggregated completers.
      java.util.Collection<jline.console.completer.Completer> getCompleters()
      Retrieve the collection of completers currently being aggregated.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • SortedAggregateCompleter

        public SortedAggregateCompleter()
      • SortedAggregateCompleter

        public SortedAggregateCompleter​(java.util.Collection<jline.console.completer.Completer> completers)
        Construct an AggregateCompleter with the given collection of completers. The completers will be used in the iteration order of the collection.
        Parameters:
        completers - the collection of completers
      • SortedAggregateCompleter

        public SortedAggregateCompleter​(jline.console.completer.Completer... completers)
        Construct an AggregateCompleter with the given completers. The completers will be used in the order given.
        Parameters:
        completers - the completers
    • Method Detail

      • getCompleters

        public java.util.Collection<jline.console.completer.Completer> getCompleters()
        Retrieve the collection of completers currently being aggregated.
        Returns:
        the aggregated completers
      • complete

        public int complete​(java.lang.String buffer,
                            int cursor,
                            java.util.List<java.lang.CharSequence> candidates)
        Perform a completion operation across all aggregated completers.
        Specified by:
        complete in interface jline.console.completer.Completer
        Returns:
        the highest completion return value from all completers
        See Also:
        Completer.complete(String, int, java.util.List)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representing the aggregated completers