Package com.unboundid.scim2.common.types
Enum AttributeDefinition.Mutability
- java.lang.Object
-
- java.lang.Enum<AttributeDefinition.Mutability>
-
- com.unboundid.scim2.common.types.AttributeDefinition.Mutability
-
- All Implemented Interfaces:
Serializable
,Comparable<AttributeDefinition.Mutability>
- Enclosing class:
- AttributeDefinition
public static enum AttributeDefinition.Mutability extends Enum<AttributeDefinition.Mutability>
This enum is used to describe the mutability of an attribute.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IMMUTABLE
The attribute can be read, and cannot be set after object creation.READ_ONLY
The attribute can be read, but not written.READ_WRITE
The attribute can be read, and written.WRITE_ONLY
The attribute can only be written, and not read.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AttributeDefinition.Mutability
fromName(String name)
finds the mutability constraint by name.String
getName()
Gets the name of the mutability constraint.static AttributeDefinition.Mutability
valueOf(String name)
Returns the enum constant of this type with the specified name.static AttributeDefinition.Mutability[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ_ONLY
public static final AttributeDefinition.Mutability READ_ONLY
The attribute can be read, but not written.
-
READ_WRITE
public static final AttributeDefinition.Mutability READ_WRITE
The attribute can be read, and written.
-
IMMUTABLE
public static final AttributeDefinition.Mutability IMMUTABLE
The attribute can be read, and cannot be set after object creation. It can be set during object creation.
-
WRITE_ONLY
public static final AttributeDefinition.Mutability WRITE_ONLY
The attribute can only be written, and not read. This might be used for password hashes for example.
-
-
Method Detail
-
values
public static AttributeDefinition.Mutability[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AttributeDefinition.Mutability c : AttributeDefinition.Mutability.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AttributeDefinition.Mutability valueOf(String name)
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
-
getName
public String getName()
Gets the name of the mutability constraint.- Returns:
- the name of the mutability constraint.
-
fromName
public static AttributeDefinition.Mutability fromName(String name) throws BadRequestException
finds the mutability constraint by name. Throws a runtime exception if the constraint cannot be found because an invalid name was given.- Parameters:
name
- the name of the mutability constraint.- Returns:
- the enum value for the given name.
- Throws:
BadRequestException
- if the name of the mutability constraint is invalid.
-
-