Class SimpleCompletor

  • All Implemented Interfaces:
    java.lang.Cloneable, jline.console.completer.Completer

    public class SimpleCompletor
    extends java.lang.Object
    implements jline.console.completer.Completer, java.lang.Cloneable
    • Constructor Detail

      • SimpleCompletor

        public SimpleCompletor()
      • SimpleCompletor

        public SimpleCompletor​(java.lang.String candidateString)
        Create a new SimpleCompletor with a single possible completion values.
      • SimpleCompletor

        public SimpleCompletor​(java.lang.String[] candidateStrings)
        Create a new SimpleCompletor with a list of possible completion values.
      • SimpleCompletor

        public SimpleCompletor​(java.io.Reader reader)
                        throws java.io.IOException
        Complete candidates using the contents of the specified Reader.
        Throws:
        java.io.IOException
      • SimpleCompletor

        public SimpleCompletor​(java.io.InputStream in)
                        throws java.io.IOException
        Complete candidates using the whitespearated values in read from the specified Reader.
        Throws:
        java.io.IOException
      • SimpleCompletor

        public SimpleCompletor​(Closure loader)
    • Method Detail

      • add

        public void add​(java.lang.String candidate)
      • leftShift

        public java.lang.Object leftShift​(java.lang.String s)
      • complete

        public int complete​(java.lang.String buffer,
                            int cursor,
                            java.util.List clist)
        Specified by:
        complete in interface jline.console.completer.Completer
      • setDelimiter

        public void setDelimiter​(java.lang.String delimiter)
      • getDelimiter

        public java.lang.String getDelimiter()
      • setCandidates

        public void setCandidates​(java.util.SortedSet candidates)
      • getCandidates

        public java.util.SortedSet getCandidates()
      • setCandidateStrings

        public void setCandidateStrings​(java.lang.String[] strings)
      • addCandidateString

        public void addCandidateString​(java.lang.String candidateString)
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException