Class Parameter


  • public class Parameter
    extends CapabilityParameter
    Class that represents a parameter that a device can have. Parameters are associated to capabilities.
    Author:
    hylli
    • Constructor Detail

      • Parameter

        public Parameter​(String name)
        Create a new parameter.
        Parameters:
        name - name of the parameter
    • Method Detail

      • getType

        public String getType()
        Get the type of the parameter value for example float, int or string.
        Returns:
        Type of the value that this parameter can have. may be null if no type
      • getUnit

        public String getUnit()
        Return the unit of this parameter.
        Returns:
        the unit, can be null if no unit
      • setType

        public void setType​(String type)
        Set the type of this parameter.
        Parameters:
        type - the type for example float
      • setUnit

        public void setUnit​(String unit)
        Set the unit of this parameter.
        Parameters:
        unit - the unit
      • getValueAlternatives

        public Set<String> getValueAlternatives()
        Get the set of values this parameter can have. Some parameters can have only particular values which this method returns.
        Returns:
        value alternatives. null if there are no predefined alternatives
      • addValueAlternative

        public void addValueAlternative​(String alternative)
        Add an alternative for this parameter's value.
        Parameters:
        alternative - the value alternative