org.apache.sysds.runtime.instructions.cp

## Class ListObject

- java.lang.Object
- - org.apache.sysds.runtime.instructions.cp.Data
  - - org.apache.sysds.runtime.instructions.cp.ListObject

- All Implemented Interfaces:
    Externalizable, Serializable

      public class ListObject
      extends Data
      implements Externalizable

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListObject()`
    `ListObject(Data[] data)`
    `ListObject(Data[] data, String[] names)`
    `ListObject(List<Data> data)`
    `ListObject(List<Data> data, List<String> names)`
    `ListObject(List<Data> data, List<String> names, List<LineageItem> lineage)`
    `ListObject(ListObject that)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ListObject` | `add(Data dat, LineageItem li)`
    `ListObject` | `add(String name, Data dat, LineageItem li)`
    `boolean` | `checkAllDataTypes(Types.DataType dt)`
    `boolean` | `contains(Data d)`
    `ListObject` | `copy()`
    `void` | `deriveAndSetStatusFromData()`
    `List<Data>` | `getData()`
    `Data` | `getData(int ix)`
    `Data` | `getData(String name)`
    `long` | `getDataSize()`
    `String` | `getDebugName()`
    `int` | `getLength()`
    `LineageItem` | `getLineageItem(int ix)`
    `List<LineageItem>` | `getLineageItems()`
    `String` | `getName(int ix)`
    `List<String>` | `getNames()`
    `int` | `getNumCacheableData()`
    `boolean[]` | `getStatus()`
    `boolean` | `isNamedList()`
    `void` | `readExternal(ObjectInput in)` Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
    `ListObject` | `remove(int pos)` Removes the element at the specified position from the list and returns that element as the only element in a new ListObject.
    `ListObject` | `set(int ix, Data data)`
    `ListObject` | `set(int ix1, int ix2, ListObject data)`
    `Data` | `set(String name, Data data)`
    `ListObject` | `set(String name1, String name2, ListObject data)`
    `void` | `setStatus(boolean[] status)`
    `Data` | `slice(int ix)`
    `ListObject` | `slice(int ix1, int ix2)`
    `Data` | `slice(String name)`
    `ListObject` | `slice(String name1, String name2)`
    `String` | `toString()`
    `void` | `writeExternal(ObjectOutput out)` Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.

    - ### Methods inherited from class org.apache.sysds.runtime.instructions.cp.Data

      `getDataType, getMetaData, getPrivacyConstraint, getValueType, removeMetaData, setMetaData, setPrivacyConstraints, updateDataCharacteristics`

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ListObject

          public ListObject()

    - #### ListObject

          public ListObject(List<Data> data)

    - #### ListObject

          public ListObject(Data[] data)

    - #### ListObject

          public ListObject(List<Data> data,
                            List<String> names)

    - #### ListObject

          public ListObject(Data[] data,
                            String[] names)

    - #### ListObject

          public ListObject(List<Data> data,
                            List<String> names,
                            List<LineageItem> lineage)

    - #### ListObject

          public ListObject(ListObject that)

  - ### Method Detail

    - #### deriveAndSetStatusFromData

          public void deriveAndSetStatusFromData()

    - #### setStatus

          public void setStatus(boolean[] status)

    - #### getStatus

          public boolean[] getStatus()

    - #### getLength

          public int getLength()

    - #### getNumCacheableData

          public int getNumCacheableData()

    - #### getNames

          public List<String> getNames()

    - #### getName

          public String getName(int ix)

    - #### isNamedList

          public boolean isNamedList()

    - #### getData

          public List<Data> getData()

    - #### getData

          public Data getData(int ix)

    - #### getData

          public Data getData(String name)

    - #### getLineageItems

          public List<LineageItem> getLineageItems()

    - #### contains

          public boolean contains(Data d)

    - #### getDataSize

          public long getDataSize()

    - #### checkAllDataTypes

          public boolean checkAllDataTypes(Types.DataType dt)

    - #### slice

          public Data slice(int ix)

    - #### getLineageItem

          public LineageItem getLineageItem(int ix)

    - #### slice

          public ListObject slice(int ix1,
                                  int ix2)

    - #### slice

          public Data slice(String name)

    - #### slice

          public ListObject slice(String name1,
                                  String name2)

    - #### copy

          public ListObject copy()

    - #### set

          public ListObject set(int ix,
                                Data data)

    - #### set

          public ListObject set(int ix1,
                                int ix2,
                                ListObject data)

    - #### set

          public Data set(String name,
                          Data data)

    - #### set

          public ListObject set(String name1,
                                String name2,
                                ListObject data)

    - #### add

          public ListObject add(Data dat,
                                LineageItem li)

    - #### add

          public ListObject add(String name,
                                Data dat,
                                LineageItem li)

    - #### remove

          public ListObject remove(int pos)

      Removes the element at the specified position from the list and returns that element as the only element in a new ListObject.
      Parameters:
        `pos` - position of element in the list
      Returns:
        new ListObject with the specified element

    - #### getDebugName

          public String getDebugName()

      Specified by:
        `getDebugName` in class `Data`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### writeExternal

          public void writeExternal(ObjectOutput out)
                             throws IOException

      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.
      Specified by:
        `writeExternal` in interface `Externalizable`
      Parameters:
        `out` - object output
      Throws:
        `IOException` - if IOException occurs

    - #### readExternal

          public void readExternal(ObjectInput in)
                            throws IOException,
                                   ClassNotFoundException

      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
      Specified by:
        `readExternal` in interface `Externalizable`
      Parameters:
        `in` - object input
      Throws:
        `IOException` - if IOException occurs
        `ClassNotFoundException`

Copyright © 2021 The Apache Software Foundation. All rights reserved.