java.lang.Object
io.aiven.commons.kafka.connector.common.templating.Parameter

public final class Parameter extends Object
A parameter is a name/value pair
  • Field Details

    • EMPTY

      public static final Parameter EMPTY
      An EMPTY parameter
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Determines if this is empty.
      Returns:
      true if this is empty.
    • getName

      public String getName()
      Gets the parameter name.
      Returns:
      the parameter name.
    • getValue

      public String getValue()
      Gets the parameter value.
      Returns:
      the parameter value.
    • asBoolean

      public Boolean asBoolean()
      Returns the parameter value as a boolean. Shorthand for Boolean.parseBoolean(getValue()).
      Returns:
      the paramater value as a poolean.
    • of

      public static Parameter of(String name, String value)
      Creates a Parameter from a name and value.
      Parameters:
      name - the name (may not be null)
      value - the value (may not be null)
      Returns:
      the parameter.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object