net.corda.client.fxutils

## Class FlattenedList<A>

- net.corda.client.fxutils.FlattenedList<A>

-     public class FlattenedList<A>

  `class FlattenedList` flattens the passed in list of ObservableValues so that changes in individual updates to the values are reflected in the exposed list as expected.

  See Also:
    `class FlattenedList`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FlattenedList.WrappedObservableValue<A>` We maintain an ObservableValue->index map. This is needed because we need the ObservableValue's index in order to propagate a change and if the listener closure captures the index at the time of the call to ObservableValue.addListener it will become incorrect if the indices shift around later.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlattenedList(javafx.collections.ObservableList<? extends javafx.beans.value.ObservableValue<? extends A>> sourceList)` `class FlattenedList` flattens the passed in list of ObservableValues so that changes in individual updates to the values are reflected in the exposed list as expected.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `A` | `get(int index)`
    `java.util.HashMap<net.corda.client.fxutils.FlattenedList.WrappedObservableValue,kotlin.Pair>` | `getIndexMap()`
    `int` | `getSize()`
    `int` | `getSourceIndex(int index)`
    `javafx.collections.ObservableList<? extends javafx.beans.value.ObservableValue<? extends A>>` | `getSourceList()`
    `java.lang.Object` | `remove(int p)`
    `java.lang.Object` | `removeAt(int p)`
    `int` | `size()`
    `void` | `sourceChanged(javafx.collections.ListChangeListener.Change<? extends javafx.beans.value.ObservableValue<? extends A>> c)`

- - ### Constructor Detail

    - #### FlattenedList

          public FlattenedList(javafx.collections.ObservableList<? extends javafx.beans.value.ObservableValue<? extends A>> sourceList)

      `class FlattenedList` flattens the passed in list of ObservableValues so that changes in individual updates to the values are reflected in the exposed list as expected.

      See Also:
        `class FlattenedList`

  - ### Method Detail

    - #### getIndexMap

          public java.util.HashMap<net.corda.client.fxutils.FlattenedList.WrappedObservableValue,kotlin.Pair> getIndexMap()

    - #### sourceChanged

          public void sourceChanged(javafx.collections.ListChangeListener.Change<? extends javafx.beans.value.ObservableValue<? extends A>> c)

    - #### get

          public A get(int index)

    - #### getSourceIndex

          public int getSourceIndex(int index)

    - #### getSize

          public int getSize()

    - #### size

          public int size()

    - #### getSourceList

          public javafx.collections.ObservableList<? extends javafx.beans.value.ObservableValue<? extends A>> getSourceList()

    - #### removeAt

          public java.lang.Object removeAt(int p)

    - #### remove

          public java.lang.Object remove(int p)