|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Flags
public class Flags
Representation of flags that may be associated with a message.
Flags can either be system flags, defined by the Flag
inner class,
or user-defined flags defined by a String. The system flags represent those expected
to be provided by most folder systems; user-defined flags allow for additional flags
on a per-provider basis.
Nested Class Summary | |
---|---|
static class |
Flags.Flag
|
Constructor Summary | |
---|---|
Flags()
Construct a Flags instance with no flags set. |
|
Flags(Flags.Flag flag)
Construct a Flags instance with a supplied system flag set. |
|
Flags(Flags flags)
Construct a Flags instance with a same flags set. |
|
Flags(String name)
Construct a Flags instance with the supplied user flags set. |
Method Summary | |
---|---|
void |
add(Flags.Flag flag)
Set a system flag. |
void |
add(Flags flags)
Set all system and user flags from the supplied Flags. |
void |
add(String name)
Set a user flag. |
Object |
clone()
Return a copy of this instance. |
boolean |
contains(Flags.Flag flag)
See if the supplied system flags are set |
boolean |
contains(Flags flags)
See if all of the supplied Flags are set |
boolean |
contains(String name)
See if the supplied user flag is set |
boolean |
equals(Object other)
Equality is defined as true if the other object is a instanceof Flags with the same system and user flags set (using a case-insensitive name comparison for user flags). |
Flags.Flag[] |
getSystemFlags()
Return a list of Flags containing the system flags that have been set |
String[] |
getUserFlags()
Return a list of user flags that have been set |
int |
hashCode()
Calculate a hashCode for this instance |
void |
remove(Flags.Flag flag)
Unset the supplied system flag. |
void |
remove(Flags flags)
Unset all flags from the supplied instance. |
void |
remove(String name)
Unset the supplied user flag. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Flags()
public Flags(Flags.Flag flag)
flag
- the system flag to setpublic Flags(Flags flags)
flags
- the instance to copypublic Flags(String name)
name
- the user flag to setMethod Detail |
---|
public void add(Flags.Flag flag)
flag
- the system flag to setpublic void add(Flags flags)
flags
- the Flags to addpublic void add(String name)
name
- the user flag to setpublic Object clone()
clone
in class Object
public boolean contains(Flags.Flag flag)
flag
- the system flags to check for
public boolean contains(Flags flags)
flags
- the flags to check for
public boolean contains(String name)
name
- the user flag to check for
public boolean equals(Object other)
equals
in class Object
other
- the instance to compare against
public int hashCode()
hashCode
in class Object
public Flags.Flag[] getSystemFlags()
Flags
containing the system flags that have been set
public String[] getUserFlags()
public void remove(Flags.Flag flag)
flag
- the flag to clearpublic void remove(Flags flags)
flags
- the flags to clearpublic void remove(String name)
name
- the flag to clear
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |