javax.mail

Class Flags

public class Flags extends Object implements Cloneable, Serializable

The set of flags on a message. Flags are composed of predefined system flags (Flags.Flag), and user defined flags (case-independent String).

Version: 1.3

Author: Chris Burdess

Nested Class Summary
static classFlags.Flag
An individual system flag.
Constructor Summary
Flags()
Construct an empty Flags object.
Flags(Flags flags)
Construct a Flags object containing the given flags.
Flags(Flags.Flag flag)
Construct a Flags object containing the given system flag.
Flags(String flag)
Construct a Flags object containing the given user flag.
Method Summary
voidadd(Flags.Flag flag)
Add the specified system flag.
voidadd(String flag)
Add the specified user flag.
voidadd(Flags flags)
Add all the flags from the specified Flags object.
Objectclone()
booleancontains(Flags.Flag flag)
Indicates whether the specified system flag is set.
booleancontains(String flag)
Indicates whether the specified user flag is set.
booleancontains(Flags flags)
Indicates whether all the flags in the specified Flags object are set in this Flags object.
booleanequals(Object other)
Flags.Flag[]getSystemFlags()
Returns the system flags.
String[]getUserFlags()
Returns the user flags.
inthashCode()
voidremove(Flags.Flag flag)
Remove the specified system flag.
voidremove(String flag)
Remove the specified user flag.
voidremove(Flags flags)
Remove all flags in the given Flags object from this Flags object.

Constructor Detail

Flags

public Flags()
Construct an empty Flags object.

Flags

public Flags(Flags flags)
Construct a Flags object containing the given flags.

Flags

public Flags(Flags.Flag flag)
Construct a Flags object containing the given system flag.

Flags

public Flags(String flag)
Construct a Flags object containing the given user flag.

Method Detail

add

public void add(Flags.Flag flag)
Add the specified system flag.

add

public void add(String flag)
Add the specified user flag.

add

public void add(Flags flags)
Add all the flags from the specified Flags object.

clone

public Object clone()

contains

public boolean contains(Flags.Flag flag)
Indicates whether the specified system flag is set.

contains

public boolean contains(String flag)
Indicates whether the specified user flag is set.

contains

public boolean contains(Flags flags)
Indicates whether all the flags in the specified Flags object are set in this Flags object.

equals

public boolean equals(Object other)

getSystemFlags

public Flags.Flag[] getSystemFlags()
Returns the system flags.

getUserFlags

public String[] getUserFlags()
Returns the user flags.

hashCode

public int hashCode()

remove

public void remove(Flags.Flag flag)
Remove the specified system flag.

remove

public void remove(String flag)
Remove the specified user flag.

remove

public void remove(Flags flags)
Remove all flags in the given Flags object from this Flags object.
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved