FlagTerm (JavaMail API documentation)
Date: 2018-05-06

javax.mail.search

## Class FlagTerm

- java.lang.Object
- - javax.mail.search.SearchTerm
  - - javax.mail.search.FlagTerm

- All Implemented Interfaces:
    java.io.Serializable

      public final class FlagTerm
      extends SearchTerm

  This class implements comparisons for Message Flags.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlagTerm(Flags flags, boolean set)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Equality comparison.
    `Flags` | `getFlags()` Return the Flags to test.
    `boolean` | `getTestSet()` Return true if testing whether the flags are set.
    `int` | `hashCode()` Compute a hashCode for this object.
    `boolean` | `match(Message msg)` The comparison method.

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

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FlagTerm

          public FlagTerm(Flags flags,
                  boolean set)

      Constructor.
      Parameters:
        `flags` - Flags object containing the flags to check for
        `set` - the flag setting to check for

  - ### Method Detail

    - #### getFlags

          public Flags getFlags()

      Return the Flags to test.

    - #### getTestSet

          public boolean getTestSet()

      Return true if testing whether the flags are set.

    - #### match

          public boolean match(Message msg)

      The comparison method.
      Specified by:
        `match` in class `SearchTerm`
      Parameters:
        `msg` - The flag comparison is applied to this Message
      Returns:
        true if the comparson succeeds, otherwise false.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Equality comparison.
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Compute a hashCode for this object.
      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms< /a>.