java.lang.Object
org.apache.nifi.components.AllowableValue
- All Implemented Interfaces:
DescribedValue
Represents a valid value for a PropertyDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionAllowableValue(String value) Constructs a new AllowableValue with the given value and and the same display name and no description.AllowableValue(String value, String displayName) Constructs a new AllowableValue with the given value and display name and no descriptionAllowableValue(String value, String displayName, String description) Constructs a new AllowableValue with the given value, display name, and description -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AllowableValuefromDescribedValue(DescribedValue describedValue) getValue()inthashCode()toString()
-
Constructor Details
-
AllowableValue
Constructs a new AllowableValue with the given value and and the same display name and no description.- Parameters:
value- that is allowed
-
AllowableValue
Constructs a new AllowableValue with the given value and display name and no description- Parameters:
value- that is alloweddisplayName- to display for the value- Throws:
NullPointerException- if either argument is null
-
AllowableValue
Constructs a new AllowableValue with the given value, display name, and description- Parameters:
value- that is validdisplayName- to show for the valuedescription- of the value- Throws:
NullPointerException- if identifier or value is null
-
-
Method Details
-
fromDescribedValue
-
getValue
- Specified by:
getValuein interfaceDescribedValue- Returns:
- the value of this AllowableValue
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDescribedValue- Returns:
- a human-readable name for this AllowableValue
-
getDescription
- Specified by:
getDescriptionin interfaceDescribedValue- Returns:
- a description for this value, or
nullif no description was provided
-
equals
- Overrides:
equalsin classObject- Returns:
- true if
thisis equal toobjofobjis the same object asthisor ifobjis an instance ofAllowableValueand both have the same value, or ifobjis a String and is equal tothis.getValue().
-
hashCode
public int hashCode() -
toString
-