Class SearchSequence


  • public class SearchSequence
    extends java.lang.Object
    This class traverses a search-tree and generates the corresponding IMAP search sequence. Each IMAPProtocol instance contains an instance of this class, which might be subclassed by subclasses of IMAPProtocol to add support for additional product-specific search terms.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Argument generateSequence​(SearchTerm term, java.lang.String charset)
      Generate the IMAP search sequence for the given search expression.
      static boolean isAscii​(java.lang.String s)
      Does this string contain only ASCII characters?
      static boolean isAscii​(SearchTerm term)
      Check if the "text" terms in the given SearchTerm contain non US-ASCII characters.
      static boolean isAscii​(SearchTerm[] terms)
      Check if any of the "text" terms in the given SearchTerms contain non US-ASCII characters.
      • Methods inherited from class java.lang.Object

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

      • SearchSequence

        public SearchSequence​(IMAPProtocol p)
        Create a SearchSequence for this IMAPProtocol.
        Parameters:
        p - the IMAPProtocol object for the server
        Since:
        JavaMail 1.6.0
      • SearchSequence

        @Deprecated
        public SearchSequence()
        Deprecated.
        Create a SearchSequence.
    • Method Detail

      • generateSequence

        public Argument generateSequence​(SearchTerm term,
                                         java.lang.String charset)
                                  throws SearchException,
                                         java.io.IOException
        Generate the IMAP search sequence for the given search expression.
        Parameters:
        term - the search term
        charset - charset for the search
        Returns:
        the SEARCH Argument
        Throws:
        SearchException - for failures
        java.io.IOException - for I/O errors
      • isAscii

        public static boolean isAscii​(SearchTerm term)
        Check if the "text" terms in the given SearchTerm contain non US-ASCII characters.
        Parameters:
        term - the search term
        Returns:
        true if only ASCII
      • isAscii

        public static boolean isAscii​(SearchTerm[] terms)
        Check if any of the "text" terms in the given SearchTerms contain non US-ASCII characters.
        Parameters:
        terms - the search terms
        Returns:
        true if only ASCII
      • isAscii

        public static boolean isAscii​(java.lang.String s)
        Does this string contain only ASCII characters?
        Parameters:
        s - the string
        Returns:
        true if only ASCII