Interface BaseItem

    • Method Detail

      • hasParent

        default boolean hasParent​()
      • hasContentOfName

        default boolean hasContentOfName​(String name)
        Check if content name exists
        Returns:
        true if this item has a content object with the specified name
      • listNames

        default Stream<String> listNames​()
        The names of the content objects currently held within this item
        Returns:
        content names
      • getContent

        Optional<Content<?>> getContent​(String id)
        The content object for the specified id
        Parameters:
        id - the content id
        Returns:
        the content if it exists
      • getContentByName

        default Stream<Content<?>> getContentByName​(String name)
        The content object for the specified name
        Parameters:
        name - the content name
        Returns:
        the content if it exists
      • getContents

        Stream<Content<?>> getContents​()
        All content objects contained within this item
        Returns:
        all content
      • getContents

        default <T extends Content<?>> Stream<T> getContents​(Class<T> clazz)
        All content objects of the specified class contained within this item
        Parameters:
        clazz - the content class to filter against
        Returns:
        content
      • removeContent

        void removeContent​(String id)
        Remove the specified content object from this item
        Parameters:
        id - the content id
      • discard

        void discard​()
        Stop processing this item any further.

        Note that it is up to the underlying implementation as to whether they delete existing output from this item or not.

      • isDiscarded

        boolean isDiscarded​()
        If this item is to be discarded at the end of current processing
        Returns:
        true if discarded