Package org.firebirdsql.gds.impl.argument

## Class Argument

- java.lang.Object
- - org.firebirdsql.gds.impl.argument.Argument

- All Implemented Interfaces:
    `java.io.Serializable`, `Parameter`
  Direct Known Subclasses:
    `TypedArgument`

      public abstract class Argument
      extends java.lang.Object
      implements Parameter, java.io.Serializable

  Base class for arguments to the parameter buffer.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `Argument​(int type)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract int` | `getLength()` |
    `int` | `getType()` | The type identifier of the parameter (usually one of the constant values in `ISCConstants`).
    `int` | `getValueAsInt()` | The value of the parameter as int.
    `long` | `getValueAsLong()` | The value of the parameter as long.
    `java.lang.String` | `getValueAsString()` | The value of the parameter as String.
    `abstract void` | `writeTo​(java.io.OutputStream outputStream)` | Writes the arguments to the supplied `OutputStream` in the XDR format of the type.

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

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

    - ### Methods inherited from interface org.firebirdsql.gds.Parameter

      `copyTo`

- - ### Constructor Detail

    - #### Argument

          protected Argument​(int type)

  - ### Method Detail

    - #### getType

          public final int getType()

      Description copied from interface: `Parameter`
      The type identifier of the parameter (usually one of the constant values in `ISCConstants`).
      Specified by:
        `getType` in interface `Parameter`
      Returns:
        The type of the argument

    - #### getValueAsString

          public java.lang.String getValueAsString()

      Description copied from interface: `Parameter`
      The value of the parameter as String.

      The implementation may throw a RuntimeException if the parameter isn't a string (or shouldn't be used as a string).

      Specified by:
        `getValueAsString` in interface `Parameter`
      Returns:
        The value as string

    - #### getValueAsInt

          public int getValueAsInt()

      Description copied from interface: `Parameter`
      The value of the parameter as int.

      The implementation may throw a RuntimeException if the parameter isn't an int (or shouldn't be used as an int).

      Specified by:
        `getValueAsInt` in interface `Parameter`
      Returns:
        The value as int

    - #### getValueAsLong

          public long getValueAsLong()

      Description copied from interface: `Parameter`
      The value of the parameter as long.

      The implementation may throw a RuntimeException if the parameter isn't a long (or shouldn't be used as a long).

      Specified by:
        `getValueAsLong` in interface `Parameter`
      Returns:
        The value as long

    - #### writeTo

          public abstract void writeTo​(java.io.OutputStream outputStream)
                                throws java.io.IOException

      Writes the arguments to the supplied `OutputStream` in the XDR format of the type.
      Parameters:
        `outputStream` - OutputStream
      Throws:
        `java.io.IOException` - For errors writing to the OutputStream

    - #### getLength

          public abstract int getLength()

      Returns:
        Total length of the buffer item when written to the OutputStream by `writeTo(java.io.OutputStream)`. This includes the item, the value and other items contributing to the total length (e.g. the length of the value).