Module org.jline

Class Candidate

    • Constructor Detail

      • Candidate

        public Candidate​(String value)
        Simple constructor with only a single String as an argument.
        Parameters:
        value - the candidate
      • Candidate

        public Candidate​(String value,
                         String displ,
                         String group,
                         String descr,
                         String suffix,
                         String key,
                         boolean complete)
        Constructs a new Candidate.
        Parameters:
        value - the value
        displ - the display string
        group - the group
        descr - the description
        suffix - the suffix
        key - the key
        complete - the complete flag
    • Method Detail

      • value

        public String value()
        The value that will be used for the actual completion. This string should not contain ANSI sequences.
        Returns:
        the value
      • displ

        public String displ()
        The string that will be displayed to the user. This string may contain ANSI sequences.
        Returns:
        the display string
      • descr

        public String descr()
        Description of this candidate, usually a small help message to understand the meaning of this candidate. This string may contain ANSI sequences.
        Returns:
        the description
      • key

        public String key()
        Candidates which have the same key will be merged together. For example, if a command has multiple aliases, they can be merged if they are using the same key.
        Returns:
        the key
      • complete

        public boolean complete()
        Boolean indicating whether this candidate is complete or if the completer may further expand the candidate value after this candidate has been selected. This can be the case when completing folders for example. If the candidate is complete and is selected, a space separator will be added.
        Returns:
        the completion flag