py4j

## Class ReturnObject

- java.lang.Object
- - py4j.ReturnObject

-     public class ReturnObject
      extends java.lang.Object

  A ReturnObject wraps a value returned by a method. If the value is a primitive, a primitive wrapper object (e.g., Integer) or a String, the value is kept in the primitiveObject field.

  If the return value is an object, a key to the reference is kept in the name field. This value can be retrieved by calling `Gateway.getObject(String)` with the key.

  Various methods are defined to determine the type of the return value. For example, if the return value is void, the name and primitiveObject fields are null, but `isVoid()` returns true.

  ReturnObject objects can only be constructed through static factory methods such as `getListReturnObject(String, int)`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ReturnObject` | `getArrayReturnObject(java.lang.String name, int size)`
    `java.lang.String` | `getCommandPart()`
    `static ReturnObject` | `getDecimalReturnObject(java.lang.Object object)`
    `static ReturnObject` | `getErrorReferenceReturnObject(java.lang.String name)`
    `static ReturnObject` | `getErrorReturnObject()`
    `static ReturnObject` | `getErrorReturnObject(java.lang.Throwable throwable)`
    `static ReturnObject` | `getIteratorReturnObject(java.lang.String name)`
    `static ReturnObject` | `getListReturnObject(java.lang.String name, int size)`
    `static ReturnObject` | `getMapReturnObject(java.lang.String name, int size)`
    `java.lang.String` | `getName()`
    `static ReturnObject` | `getNullReturnObject()`
    `java.lang.Object` | `getPrimitiveObject()`
    `static ReturnObject` | `getPrimitiveReturnObject(java.lang.Object primitive)`
    `static ReturnObject` | `getReferenceReturnObject(java.lang.String name)`
    `static ReturnObject` | `getSetReturnObject(java.lang.String name, int size)`
    `int` | `getSize()`
    `static ReturnObject` | `getVoidReturnObject()`
    `boolean` | `isArray()`
    `boolean` | `isDecimal()`
    `boolean` | `isError()`
    `boolean` | `isIterator()`
    `boolean` | `isList()`
    `boolean` | `isMap()`
    `boolean` | `isNull()`
    `boolean` | `isReference()`
    `boolean` | `isSet()`
    `boolean` | `isVoid()`
    `void` | `setArray(boolean isArray)`
    `void` | `setCommandPart(java.lang.String commandPart)`
    `void` | `setError(boolean isError)`
    `void` | `setIterator(boolean isIterator)`
    `void` | `setList(boolean isList)`
    `void` | `setMap(boolean isMap)`
    `void` | `setName(java.lang.String name)`
    `void` | `setNull(boolean isNull)`
    `void` | `setPrimitiveObject(java.lang.Object primitiveObject)`
    `void` | `setReference(boolean isReference)`
    `void` | `setSet(boolean isSet)`
    `void` | `setSize(int size)`
    `void` | `setVoid(boolean isVoid)`

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

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

- - ### Method Detail

    - #### getArrayReturnObject

          public static ReturnObject getArrayReturnObject(java.lang.String name,
                                                          int size)

    - #### getDecimalReturnObject

          public static ReturnObject getDecimalReturnObject(java.lang.Object object)

    - #### getErrorReferenceReturnObject

          public static ReturnObject getErrorReferenceReturnObject(java.lang.String name)

    - #### getErrorReturnObject

          public static ReturnObject getErrorReturnObject()

    - #### getErrorReturnObject

          public static ReturnObject getErrorReturnObject(java.lang.Throwable throwable)

    - #### getIteratorReturnObject

          public static ReturnObject getIteratorReturnObject(java.lang.String name)

    - #### getListReturnObject

          public static ReturnObject getListReturnObject(java.lang.String name,
                                                         int size)

    - #### getMapReturnObject

          public static ReturnObject getMapReturnObject(java.lang.String name,
                                                        int size)

    - #### getNullReturnObject

          public static ReturnObject getNullReturnObject()

    - #### getPrimitiveReturnObject

          public static ReturnObject getPrimitiveReturnObject(java.lang.Object primitive)

    - #### getReferenceReturnObject

          public static ReturnObject getReferenceReturnObject(java.lang.String name)

    - #### getSetReturnObject

          public static ReturnObject getSetReturnObject(java.lang.String name,
                                                        int size)

    - #### getVoidReturnObject

          public static ReturnObject getVoidReturnObject()

    - #### getCommandPart

          public java.lang.String getCommandPart()

    - #### getName

          public java.lang.String getName()

    - #### getPrimitiveObject

          public java.lang.Object getPrimitiveObject()

    - #### getSize

          public int getSize()

    - #### isArray

          public boolean isArray()

    - #### isDecimal

          public boolean isDecimal()

    - #### isError

          public boolean isError()

    - #### isIterator

          public boolean isIterator()

    - #### isList

          public boolean isList()

    - #### isMap

          public boolean isMap()

    - #### isNull

          public boolean isNull()

    - #### isReference

          public boolean isReference()

    - #### isSet

          public boolean isSet()

    - #### isVoid

          public boolean isVoid()

    - #### setArray

          public void setArray(boolean isArray)

    - #### setCommandPart

          public void setCommandPart(java.lang.String commandPart)

    - #### setError

          public void setError(boolean isError)

    - #### setIterator

          public void setIterator(boolean isIterator)

    - #### setList

          public void setList(boolean isList)

    - #### setMap

          public void setMap(boolean isMap)

    - #### setName

          public void setName(java.lang.String name)

    - #### setNull

          public void setNull(boolean isNull)

    - #### setPrimitiveObject

          public void setPrimitiveObject(java.lang.Object primitiveObject)

    - #### setReference

          public void setReference(boolean isReference)

    - #### setSet

          public void setSet(boolean isSet)

    - #### setSize

          public void setSize(int size)

    - #### setVoid

          public void setVoid(boolean isVoid)