Class OutletResult
java.lang.Object
org.apache.torque.generator.outlet.OutletResult
The result of an outlet. Can either be a String or a byte array.
-
Constructor Summary
ConstructorsConstructorDescriptionOutletResult(byte[] byteArrayResult) Constructor for a byte array result.OutletResult(String stringResult) Constructor for a String result. -
Method Summary
Modifier and TypeMethodDescriptionstatic OutletResultconcatenate(Iterable<OutletResult> input) Concatenates a list of OutletResults.static OutletResultconcatenate(OutletResult... input) Concatenates an array of OutletResults.booleanbyte[]Returns the byte array result.Returns the string result.inthashCode()booleanReturns whether the result type is byte array.booleanReturns whether the result type is String.toString()
-
Constructor Details
-
OutletResult
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 Details
-
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() -
equals
-
toString
-
concatenate
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
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.
-