Class OutletResult


  • public class OutletResult
    extends Object
    The result of an outlet. Can either be a String or a byte array.
    • 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
      • 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.