Package com.atlassian.sal.api.features
Enum ValidFeatureKeyPredicate
- All Implemented Interfaces:
Serializable,Comparable<ValidFeatureKeyPredicate>,java.lang.constant.Constable,Predicate<String>
@Immutable
public enum ValidFeatureKeyPredicate
extends Enum<ValidFeatureKeyPredicate>
implements Predicate<String>
A given string represents a valid feature key if the following conditions are satisfied:
- Contains alphanumeric characters including the dot (.), dash (,) and underscore (_) only
- The minimal size is at least one character, while the upper limit is not restricted
- Since:
- 2.10
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckFeatureKey(String input) Ensure that the given input string is a valid feature key.static booleanisValidFeatureKey(String input) Verify that the given string represents a valid feature key.booleanVerify that the given string represents a valid feature key.static ValidFeatureKeyPredicateReturns the enum constant of this type with the specified name.static ValidFeatureKeyPredicate[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
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
-
isValidFeatureKey
Verify that the given string represents a valid feature key.- Parameters:
input- a feature key candidate- Returns:
trueif the given input is an acceptable feature key,falseotherwise- See Also:
-
checkFeatureKey
Ensure that the given input string is a valid feature key. Otherwise an exception is thrown.- Parameters:
input- the expected feature key- Returns:
- the input if it is a valid feature key
- Throws:
InvalidFeatureKeyException- if the input is not a valid feature key
-
test
Verify that the given string represents a valid feature key.
-