Package com.enonic.xp.content

## Class Contents

- java.lang.Object
- - com.enonic.xp.support.AbstractImmutableEntitySet<Content>
  - - com.enonic.xp.content.Contents

- All Implemented Interfaces:
    `Iterable<Content>`

      @PublicApi
      public final class Contents
      extends AbstractImmutableEntitySet<Content>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `Contents.Builder` |

  - ### Field Summary

    - ### Fields inherited from class com.enonic.xp.support.AbstractImmutableEntitySet

      `set`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Contents.Builder` | `create()` |
    `static Contents` | `empty()` |
    `static Contents` | `from​(Content... contents)` |
    `static Contents` | `from​(Iterable<? extends Content> contents)` |
    `static Contents` | `from​(Collection<? extends Content> contents)` |
    `Content` | `getContentById​(ContentId contentId)` | Deprecated.
    `ContentIds` | `getIds()` |
    `ContentPaths` | `getPaths()` |
    `String` | `toString()` |

    - ### Methods inherited from class com.enonic.xp.support.AbstractImmutableEntitySet

      `contains, equals, first, getSet, getSize, hashCode, isEmpty, isNotEmpty, iterator, stream`

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

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

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

      `forEach, spliterator`

- - ### Method Detail

    - #### getPaths

          public ContentPaths getPaths()

    - #### getIds

          public ContentIds getIds()

    - #### getContentById

          @Deprecated
          public Content getContentById​(ContentId contentId)

      Deprecated.

    - #### empty

          public static Contents empty()

    - #### from

          public static Contents from​(Content... contents)

    - #### from

          public static Contents from​(Iterable<? extends Content> contents)

    - #### from

          public static Contents from​(Collection<? extends Content> contents)

    - #### create

          public static Contents.Builder create()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractImmutableEntitySet<Content>`