org.cybergarage.upnp

## Class Argument

- java.lang.Object
- - org.cybergarage.upnp.Argument

-     public class Argument
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ELEM_NAME` Element name for argument
    `static String` | `IN` Direction constant for input arguments
    `static String` | `OUT` Direction constant for output arguments

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Argument()` Creates a new Argument with no associated service.
    `Argument(Node servNode)` Creates a new Argument associated with the specified service node.
    `Argument(Node servNode, Node argNode)` Creates a new Argument associated with the specified service node and argument node.
    `Argument(String name, String value)` Creates a new Argument with the specified name and value.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Action` | `getAction()` Gets the action this argument belongs to.
    `Node` | `getActionNode()` Gets the action node this argument belongs to.
    `Node` | `getArgumentNode()` Gets the argument node containing argument definition.
    `String` | `getDirection()` Gets the direction of this argument.
    `int` | `getIntegerValue()` Gets the integer value of this argument.
    `String` | `getName()` Gets the name of this argument.
    `StateVariable` | `getRelatedStateVariable()` Gets the related state variable for this argument.
    `String` | `getRelatedStateVariableName()` Gets the name of the related state variable for this argument.
    `Service` | `getService()` Gets the service this argument belongs to.
    `Object` | `getUserData()` Gets the user-defined data associated with this argument.
    `String` | `getValue()` Gets the string value of this argument.
    `static boolean` | `isArgumentNode(Node node)` Checks if the specified node is an argument node.
    `boolean` | `isInDirection()` Checks if this argument is an input argument.
    `boolean` | `isOutDirection()` Checks if this argument is an output argument.
    `void` | `setDirection(String value)` Sets the direction of this argument (in or out).
    `void` | `setName(String value)` Sets the name of this argument.
    `void` | `setRelatedStateVariableName(String value)` Sets the name of the related state variable for this argument.
    `(package private) void` | `setService(Service s)` Sets the service this argument belongs to.
    `void` | `setUserData(Object data)` Sets user-defined data for this argument.
    `void` | `setValue(int value)` Sets the integer value of this argument.
    `void` | `setValue(String value)` Sets the string value of this argument.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ELEM_NAME

          public static final String ELEM_NAME

      Element name for argument
      See Also:
        Constant Field Values

    - #### IN

          public static final String IN

      Direction constant for input arguments
      See Also:
        Constant Field Values

    - #### OUT

          public static final String OUT

      Direction constant for output arguments
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Argument

          public Argument()

      Creates a new Argument with no associated service.

    - #### Argument

          public Argument(Node servNode)

      Creates a new Argument associated with the specified service node.
      Parameters:
        `servNode` - service node to associate

    - #### Argument

          public Argument(Node servNode,
                          Node argNode)

      Creates a new Argument associated with the specified service node and argument node.
      Parameters:
        `servNode` - service node to associate
        `argNode` - argument node containing definition

    - #### Argument

          public Argument(String name,
                          String value)

      Creates a new Argument with the specified name and value.
      Parameters:
        `name` - argument name
        `value` - argument value

  - ### Method Detail

    - #### getAction

          public Action getAction()

      Gets the action this argument belongs to.
      Returns:
        action object

    - #### getActionNode

          public Node getActionNode()

      Gets the action node this argument belongs to.
      Returns:
        action node, or null if not found

    - #### getArgumentNode

          public Node getArgumentNode()

      Gets the argument node containing argument definition.
      Returns:
        argument node

    - #### getDirection

          public String getDirection()

      Gets the direction of this argument.
      Returns:
        direction string ("in" or "out")

    - #### getIntegerValue

          public int getIntegerValue()

      Gets the integer value of this argument.
      Returns:
        argument value as integer, or 0 if parsing fails

    - #### getName

          public String getName()

      Gets the name of this argument.
      Returns:
        argument name

    - #### getRelatedStateVariable

          public StateVariable getRelatedStateVariable()

      Gets the related state variable for this argument.
      Returns:
        state variable object, or null if not found

    - #### getRelatedStateVariableName

          public String getRelatedStateVariableName()

      Gets the name of the related state variable for this argument.
      Returns:
        related state variable name

    - #### getService

          public Service getService()

      Gets the service this argument belongs to.
      Returns:
        service object

    - #### getUserData

          public Object getUserData()

      Gets the user-defined data associated with this argument.
      Returns:
        user data object

    - #### getValue

          public String getValue()

      Gets the string value of this argument.
      Returns:
        argument value as string

    - #### isArgumentNode

          public static boolean isArgumentNode(Node node)

      Checks if the specified node is an argument node.
      Parameters:
        `node` - node to check
      Returns:
        true if the node is an argument node, false otherwise

    - #### isInDirection

          public boolean isInDirection()

      Checks if this argument is an input argument.
      Returns:
        true if direction is "in", false otherwise

    - #### isOutDirection

          public boolean isOutDirection()

      Checks if this argument is an output argument.
      Returns:
        true if direction is "out", false otherwise

    - #### setDirection

          public void setDirection(String value)

      Sets the direction of this argument (in or out).
      Parameters:
        `value` - direction to set

    - #### setName

          public void setName(String value)

      Sets the name of this argument.
      Parameters:
        `value` - name to set

    - #### setRelatedStateVariableName

          public void setRelatedStateVariableName(String value)

      Sets the name of the related state variable for this argument.
      Parameters:
        `value` - state variable name to set

    - #### setService

          void setService(Service s)

      Sets the service this argument belongs to.
      Parameters:
        `s` - service to set

    - #### setUserData

          public void setUserData(Object data)

      Sets user-defined data for this argument.
      Parameters:
        `data` - data to set

    - #### setValue

          public void setValue(int value)

      Sets the integer value of this argument.
      Parameters:
        `value` - integer value to set

    - #### setValue

          public void setValue(String value)

      Sets the string value of this argument.
      Parameters:
        `value` - value to set