Package com.sun.mail.imap

# Class SortTerm

java.lang.Object
com.sun.mail.imap.SortTerm

public final class SortTerm extends Object
A particular sort criteria, as defined by RFC 5256. Sort criteria are used with the `getSortedMessages` method. Multiple sort criteria are specified in an array with the order in the array specifying the order in which the sort criteria are applied.

Since:
  JavaMail 1.4.4

## Field Summary

Fields
Modifier and Type
Field
Description
`static final SortTerm`
`ARRIVAL`
Sort by message arrival date and time.
`static final SortTerm`
`CC`
Sort by email address of first Cc recipient.
`static final SortTerm`
`DATE`
Sort by sent date and time.
`static final SortTerm`
`FROM`
Sort by first From email address.
`static final SortTerm`
`REVERSE`
Reverse the sort order of the following item.
`static final SortTerm`
`SIZE`
Sort by the message size.
`static final SortTerm`
`SUBJECT`
Sort by the base subject text.
`static final SortTerm`
`TO`
Sort by email address of first To recipient.

## Method Summary

Modifier and Type
Method
Description
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### ARRIVAL

public static final SortTerm ARRIVAL
Sort by message arrival date and time.

### CC

public static final SortTerm CC
Sort by email address of first Cc recipient.

### DATE

public static final SortTerm DATE
Sort by sent date and time.

### FROM

public static final SortTerm FROM
Sort by first From email address.

### REVERSE

public static final SortTerm REVERSE
Reverse the sort order of the following item.

### SIZE

public static final SortTerm SIZE
Sort by the message size.

### SUBJECT

public static final SortTerm SUBJECT
Sort by the base subject text. Note that the "base subject" is defined by RFC 5256 and doesn't include items such as "Re:" in the subject header.

### TO

public static final SortTerm TO
Sort by email address of first To recipient.

## Method Details

### toString

public String toString()

Overrides:
  `toString` in class `Object`