Class AllowableValue

java.lang.Object
org.apache.nifi.components.AllowableValue
All Implemented Interfaces:
DescribedValue

public class AllowableValue extends Object implements DescribedValue

Represents a valid value for a PropertyDescriptor

  • Field Details

    • value

      private final String value
    • displayName

      private final String displayName
    • description

      private final String description
  • Constructor Details

    • AllowableValue

      public AllowableValue(String value)
      Constructs a new AllowableValue with the given value and and the same display name and no description.
      Parameters:
      value - that is allowed
    • AllowableValue

      public AllowableValue(String value, String displayName)
      Constructs a new AllowableValue with the given value and display name and no description
      Parameters:
      value - that is allowed
      displayName - to display for the value
      Throws:
      NullPointerException - if either argument is null
    • AllowableValue

      public AllowableValue(String value, String displayName, String description)
      Constructs a new AllowableValue with the given value, display name, and description
      Parameters:
      value - that is valid
      displayName - to show for the value
      description - of the value
      Throws:
      NullPointerException - if identifier or value is null
  • Method Details

    • getValue

      public String getValue()
      Specified by:
      getValue in interface DescribedValue
      Returns:
      the value of this AllowableValue
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface DescribedValue
      Returns:
      a human-readable name for this AllowableValue
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface DescribedValue
      Returns:
      a description for this value, or null if no description was provided
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to obj of obj is the same object as this or if obj is an instance of AllowableValue and both have the same value, or if obj is a String and is equal to this.getValue().
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      based solely off of the value
    • toString

      public String toString()
      Overrides:
      toString in class Object