Package org.jivesoftware.smack.packet
Enum Presence.Mode
- All Implemented Interfaces:
Serializable,Comparable<Presence.Mode>
- Enclosing class:
Presence
An enum to represent the presence mode.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Presence.ModefromString(String string) Converts a String into the corresponding types.static Presence.ModeReturns the enum constant of this type with the specified name.static Presence.Mode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
chat
Free to chat. -
available
Available (the default). -
away
Away. -
xa
Away for an extended period of time. -
dnd
Do not disturb.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Converts a String into the corresponding types. Valid String values that can be converted to types are: "chat", "available", "away", "xa", and "dnd".- Parameters:
string- the String value to covert.- Returns:
- the corresponding Type.
- Throws:
IllegalArgumentException- when not able to parse the string parameterNullPointerException- if the string is null
-