Class ParameterAssociation<T extends CapabilityParameter>

  • Type Parameters:
    T - Does this model relationships for Parameters or ParameterObjects

    public class ParameterAssociation<T extends CapabilityParameter>
    extends Object
    Represents the relationship between capabilities or parameter objects and capability parameters. Tells for example that a capability has a particular parameter and how many values a device with the capability can have for it.
    Author:
    hylli
    • Constructor Detail

      • ParameterAssociation

        public ParameterAssociation​(T parameter)
        Create an association for the given parameter.
        Parameters:
        parameter - the parameter
    • Method Detail

      • getAtLeast

        public Integer getAtLeast()
        The minimum number of parameter values for a device with this capability.
        Returns:
        the amount, null if not defined.
      • setAtLeast

        public void setAtLeast​(Integer atLeast)
        The minimum number of parameter values for a device with this capability.
        Parameters:
        atLeast - the amount
      • getExactly

        public Integer getExactly()
        The exact number of parameter values for a device with this capability. If this is not null then getAtLeast() and getAtMost() return null
        Returns:
        number of parameter values, null if not defined
      • setExactly

        public void setExactly​(Integer exactly)
        The exact number of parameter values for a device with this capability.
        Parameters:
        exactly - the number of parameter values
      • getAtMost

        public Integer getAtMost()
        The maximum number of parameter values for a device with this capability.
        Returns:
        the atMost
      • setAtMost

        public void setAtMost​(Integer atMost)
        The maximum number of of parameter values for a device with this capability.
        Parameters:
        atMost - number of parameter values
      • getParameter

        public T getParameter()
        Get the parameter this association is for.
        Returns:
        the parameter
      • setParameter

        public void setParameter​(T parameter)
        Set the parameter this is an association for.
        Parameters:
        parameter - the parameter to set