Package com.enonic.xp.support

## Class AbstractImmutableEntitySet<T>

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

- All Implemented Interfaces:
    `Iterable<T>`
  Direct Known Subclasses:
    `AggregationQueries`, `Aggregations`, `AttachedBinaries`, `AuditLogIds`, `AuditLogs`, `AuditLogUris`, `BinaryAttachments`, `BinaryReferences`, `BlobKeys`, `Branches`, `Buckets`, `ClusterNodes`, `ContentIds`, `ContentPaths`, `Contents`, `ContentTypeNames`, `CreateAttachments`, `DeleteSnapshotsResult`, `DescriptorKeys`, `ExtraDatas`, `MacroDescriptors`, `NodeCommitEntries`, `NodeCommitIds`, `NodeIds`, `NodePaths`, `Nodes`, `NodeVersionIds`, `NodeVersionKeys`, `PrincipalKeys`, `PublishRequestItems`, `PushNodeEntries`, `Repositories`, `RepositoryIds`, `RoutableNodeVersionIds`, `SnapshotResults`, `SuggestionQueries`, `Suggestions`

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

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ImmutableSet<T>` | `set` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `AbstractImmutableEntitySet​(ImmutableSet<T> set)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `contains​(T o)` |
    `boolean` | `equals​(Object o)` |
    `T` | `first()` |
    `Set<T>` | `getSet()` |
    `int` | `getSize()` |
    `int` | `hashCode()` |
    `boolean` | `isEmpty()` |
    `boolean` | `isNotEmpty()` |
    `Iterator<T>` | `iterator()` |
    `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

    - #### set

          protected final ImmutableSet<T> set

  - ### Constructor Detail

    - #### AbstractImmutableEntitySet

          protected AbstractImmutableEntitySet​(ImmutableSet<T> set)

  - ### Method Detail

    - #### getSize

          public final int getSize()

    - #### isEmpty

          public final boolean isEmpty()

    - #### isNotEmpty

          public final boolean isNotEmpty()

    - #### first

          public final T first()

    - #### getSet

          public final Set<T> getSet()

    - #### 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`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`