Class Parameter

java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.Parameter
All Implemented Interfaces:
Serializable, Comparable<Parameter>

public class Parameter extends Object implements Serializable, Comparable<Parameter>
This class define a parameter. The parameter name is always in lower case.
Since:
1.0
Author:
Laurent Jourdren
See Also:
  • Constructor Details

    • Parameter

      public Parameter(String name, String value)
      Public constructor.
      Parameters:
      name - Name of the parameter
      value - value of the parameter
  • Method Details

    • getName

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

      public String getValue()
      Get the value of the parameter.
      Returns:
      Returns the value
    • getStringValue

      public String getStringValue()
      Get the value of the parameter as a String value.
      Returns:
      the value as a String
    • getLowerStringValue

      public String getLowerStringValue()
      Get the value of the parameter as a lower case String value.
      Returns:
      the value as a String
    • getUpperStringValue

      public String getUpperStringValue()
      Get the value of the parameter as a upper case String value.
      Returns:
      the value as a String
    • getIntValue

      public int getIntValue() throws EoulsanException
      Get the value of the parameter as a integer value.
      Returns:
      the value as an integer
      Throws:
      EoulsanException - if the parameter if not an integer
    • getIntValueGreaterOrEqualsTo

      public int getIntValueGreaterOrEqualsTo(int min) throws EoulsanException
      * Get the value of the parameter as a integer value and check if this value is greater or equals to the min parameter value.
      Parameters:
      min - minimal value (included)
      Returns:
      the value as an integer
      Throws:
      EoulsanException - if the parameter if not in the range
    • getIntValueInRange

      public int getIntValueInRange(int min, int max) throws EoulsanException
      Get the value of the parameter as a integer value and check if this value is in the correct range.
      Parameters:
      min - minimal value (included)
      max - maximal value (included)
      Returns:
      the value as an integer
      Throws:
      EoulsanException - if the parameter if not in the range
    • getDoubleValue

      public double getDoubleValue() throws EoulsanException
      Get the value of the parameter as a double value.
      Returns:
      the value as an integer
      Throws:
      EoulsanException - if the parameter if not a double
    • getBooleanValue

      public boolean getBooleanValue()
      Get the value of the parameter as a boolean value.
      Returns:
      the value as a boolean
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(Parameter p)
      Specified by:
      compareTo in interface Comparable<Parameter>