org.apache.torque.generator.outlet

## Class OutletResult

- java.lang.Object
- - org.apache.torque.generator.outlet.OutletResult

-     public class OutletResult
      extends Object

  The result of an outlet. Can either be a String or a byte array.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OutletResult(byte[] byteArrayResult)` Constructor for a byte array result.
    `OutletResult(String stringResult)` Constructor for a String result.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static OutletResult` | `concatenate(Iterable<OutletResult> input)` Concatenates a list of OutletResults.
    `static OutletResult` | `concatenate(OutletResult... input)` Concatenates an array of OutletResults.
    `boolean` | `equals(Object obj)`
    `byte[]` | `getByteArrayResult()` Returns the byte array result.
    `String` | `getStringResult()` Returns the string result.
    `int` | `hashCode()`
    `boolean` | `isByteArrayResult()` Returns whether the result type is byte array.
    `boolean` | `isStringResult()` Returns whether the result type is String.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### OutletResult

          public OutletResult(String stringResult)

      Constructor for a String result.
      Parameters:
        `stringResult` - the String result.

    - #### OutletResult

          public OutletResult(byte[] byteArrayResult)

      Constructor for a byte array result.
      Parameters:
        `byteArrayResult` - the byte array result.

  - ### Method Detail

    - #### getStringResult

          public String getStringResult()

      Returns the string result.
      Returns:
        the string result, or null if this class contains a byte array result.

    - #### getByteArrayResult

          public byte[] getByteArrayResult()

      Returns the byte array result.
      Returns:
        the byte array result, or null if this class contains a string result.

    - #### isStringResult

          public boolean isStringResult()

      Returns whether the result type is String. Note: If the instance was constructed with null byte array, this method also returns true.
      Returns:
        false if the contained byteArray is not null, true otherwise.

    - #### isByteArrayResult

          public boolean isByteArrayResult()

      Returns whether the result type is byte array. Note: If the instance was constructed with null string, this method also returns true.
      Returns:
        false if the contained String is not null, true otherwise.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### concatenate

          public static OutletResult concatenate(OutletResult... input)
                                          throws GeneratorException

      Concatenates an array of OutletResults.
      Parameters:
        `input` - the OutletResults to concatenate, not null, not empty, must not contain null, all of the same type (either all string or all byte array).
      Returns:
        the concatenated input.
      Throws:
        `GeneratorException` - if the input outlet results are of a different type.

    - #### concatenate

          public static OutletResult concatenate(Iterable<OutletResult> input)
                                          throws GeneratorException

      Concatenates a list of OutletResults.
      Parameters:
        `input` - the OutletResults to concatenate, not null, not empty, must not contain null, all of the same type (either all string or all byte array).
      Returns:
        the concatenated input.
      Throws:
        `GeneratorException` - if the input outlet results are of a different type.

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.