Package com.enonic.xp.support

## Class AbstractImmutableEntityList<T>

- java.lang.Object
- - com.enonic.xp.support.AbstractImmutableEntityList<T>

- All Implemented Interfaces:
    `Iterable<T>`
  Direct Known Subclasses:
    `AdminToolDescriptors`, `ApplicationKeys`, `Applications`, `Attachments`, `ContentTypes`, `ControllerMappingDescriptors`, `Descriptors`, `Filters`, `IdProviderKeys`, `IdProviders`, `LayoutDescriptors`, `MixinNames`, `Mixins`, `MultiRepoNodeHits`, `NodeHits`, `NodeVersions`, `OrderExpressions`, `PageDescriptors`, `PageTemplates`, `PartDescriptors`, `PrincipalRelationships`, `Principals`, `ProjectGraph`, `Projects`, `RelationshipTypes`, `ReorderChildContentsParams`, `ReorderChildNodesParams`, `ResourceKeys`, `ResponseProcessorDescriptors`, `ServiceDescriptors`, `SiteConfigs`, `StyleDescriptors`, `XDataMappings`, `XDataNames`, `XDatas`

      @PublicApi
      public abstract class AbstractImmutableEntityList<T>
      extends Object
      implements Iterable<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ImmutableList<T>` | `list` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `AbstractImmutableEntityList​(ImmutableList<T> list)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `contains​(T o)` |
    `boolean` | `equals​(Object o)` |
    `T` | `first()` |
    `T` | `get​(int index)` |
    `List<T>` | `getList()` |
    `int` | `getSize()` |
    `int` | `hashCode()` |
    `boolean` | `isEmpty()` |
    `boolean` | `isNotEmpty()` |
    `Iterator<T>` | `iterator()` |
    `T` | `last()` |
    `Stream<T>` | `stream()` |
    `String` | `toString()` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### list

          protected final ImmutableList<T> list

  - ### Constructor Detail

    - #### AbstractImmutableEntityList

          protected AbstractImmutableEntityList​(ImmutableList<T> list)

  - ### Method Detail

    - #### getSize

          public final int getSize()

    - #### isEmpty

          public final boolean isEmpty()

    - #### isNotEmpty

          public final boolean isNotEmpty()

    - #### get

          public final T get​(int index)

    - #### first

          public final T first()

    - #### last

          public final T last()

    - #### getList

          public final List<T> getList()

    - #### stream

          public final Stream<T> stream()

    - #### contains

          public final boolean contains​(T o)

    - #### iterator

          public final Iterator<T> iterator()

      Specified by:
        `iterator` in interface `Iterable<T>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`