Skip to content

Package: SortTerm

SortTerm

nameinstructionbranchcomplexitylinemethod
SortTerm(String)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 41 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
toString()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Public License v. 2.0, which is available at
6: * http://www.eclipse.org/legal/epl-2.0.
7: *
8: * This Source Code may also be made available under the following Secondary
9: * Licenses when the conditions for such availability set forth in the
10: * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11: * version 2 with the GNU Classpath Exception, which is available at
12: * https://www.gnu.org/software/classpath/license.html.
13: *
14: * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15: */
16:
17: package org.eclipse.angus.mail.imap;
18:
19: /**
20: * A particular sort criteria, as defined by
21: * <A HREF="http://www.ietf.org/rfc/rfc5256.txt">RFC 5256</A>.
22: * Sort criteria are used with the
23: * {@link IMAPFolder#getSortedMessages getSortedMessages} method.
24: * Multiple sort criteria are specified in an array with the order in
25: * the array specifying the order in which the sort criteria are applied.
26: *
27: * @since JavaMail 1.4.4
28: */
29: public final class SortTerm {
30: /**
31: * Sort by message arrival date and time.
32: */
33: public static final SortTerm ARRIVAL = new SortTerm("ARRIVAL");
34:
35: /**
36: * Sort by email address of first Cc recipient.
37: */
38: public static final SortTerm CC = new SortTerm("CC");
39:
40: /**
41: * Sort by sent date and time.
42: */
43: public static final SortTerm DATE = new SortTerm("DATE");
44:
45: /**
46: * Sort by first From email address.
47: */
48: public static final SortTerm FROM = new SortTerm("FROM");
49:
50: /**
51: * Reverse the sort order of the following item.
52: */
53: public static final SortTerm REVERSE = new SortTerm("REVERSE");
54:
55: /**
56: * Sort by the message size.
57: */
58: public static final SortTerm SIZE = new SortTerm("SIZE");
59:
60: /**
61: * Sort by the base subject text. Note that the "base subject"
62: * is defined by RFC 5256 and doesn't include items such as "Re:"
63: * in the subject header.
64: */
65: public static final SortTerm SUBJECT = new SortTerm("SUBJECT");
66:
67: /**
68: * Sort by email address of first To recipient.
69: */
70: public static final SortTerm TO = new SortTerm("TO");
71:
72: private String term;
73: private SortTerm(String term) {
74:         this.term = term;
75: }
76:
77: @Override
78: public String toString() {
79:         return term;
80: }
81: }