Enum StreamPostPolicy
- All Implemented Interfaces:
Serializable
,Comparable<StreamPostPolicy>
Defines the stream post policy.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnly administrators can post to the stream.Any user can post to the stream.Only new members can post to the stream.An unknown post policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamPostPolicy
fromInt
(int policy) int
getId()
static StreamPostPolicy
Returns the enum constant of this type with the specified name.static StreamPostPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ANY
Any user can post to the stream. -
ADMIN_ONLY
Only administrators can post to the stream. -
NEW_MEMBERS_ONLY
Only new members can post to the stream. -
UNKNOWN
An unknown post policy. This usually indicates an error in the response from Zulip.
-
-
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
-
getId
public int getId() -
fromInt
-