Class Parameter<T>

java.lang.Object
com.denodo.configuration.Parameter<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CompoundParameter, SimpleParameter

public abstract class Parameter<T> extends Object implements Serializable
Parameters have a name and a value if they are single-valued or a Collection of values if they are multivalued. The type of SimpleParameter values is an Object. The type of all values must be the same. The type of CompoundParameter values is a ParameterStructure which contains Parameter objects. Two implementations of Parameter are provided: As an example consider the "accounts" parameter required by a mail crawler. This parameter specifies which mail accounts should be crawled and it is a multivalued compound parameter. Each value of the "accounts" parameter is a structure of two simple parameters:
  • "login" parameter:single-valued, containing a String
  • "password" parameter: single-valued containing a String
So the "account" parameter contains a Collection of ParameterStructure, each ParameterStructure representing one account to be crawled with one "login" and one "password".
See Also:
  • Field Details

    • instances

      protected Integer instances
  • Constructor Details

    • Parameter

      public Parameter()
      Creates a new Parameter object.
    • Parameter

      public Parameter(String name)
      Creates a new Parameter object with the given name.
      Parameters:
      name - the name of parameter.
    • Parameter

      public Parameter(String name, boolean encrypted)
  • Method Details

    • getInstances

      public int getInstances()
    • setInstances

      public void setInstances(int instances)
    • getName

      public String getName()
      Obtains the name of the parameter.
      Returns:
      the parameter name.
    • setName

      public void setName(String name)
      Sets the name of the parameter.
      Parameters:
      name - the name to set.
    • getValue

      public abstract T getValue()
      Obtains the first value of the parameter if it is a multivalued parameter or the unique value if it is a single-valued parameter.
      Returns:
      the first value of the parameter if it is multivalued; the unique value if it is single-valued.
    • getValues

      public abstract Collection<T> getValues()
      Obtains the values of the parameter.
      Returns:
      the collection of parameter values.
    • setValues

      public abstract void setValues(Collection<T> values)
      Sets the values of the parameter.
      Parameters:
      values - the Collection of values to set.
    • addValue

      public abstract void addValue(T value)
      Adds a new value to the parameter.
      Parameters:
      value - the value to add.
    • isEncrypted

      public boolean isEncrypted()
    • setEncrypted

      public void setEncrypted(boolean encrypted)
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object