Class LaunchImpl.TreeItem

  • Enclosing class:
    LaunchImpl

    protected static class LaunchImpl.TreeItem
    extends java.lang.Object
    Wrapper around TestItem entity to be able to track parent and children items
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TreeItem()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToQueue​(io.reactivex.Completable completable)
      Adds a completion task representing a child operation to this node.
      java.util.List<io.reactivex.Completable> getChildren()
      Returns a snapshot list of child completion tasks.
      io.reactivex.Maybe<java.lang.String> getParent()
      Returns the parent item ID promise or null if this is a root.
      LaunchImpl.TreeItem withParent​(io.reactivex.Maybe<java.lang.String> parent)
      Sets the parent item promise for this tree node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeItem

        protected TreeItem()
    • Method Detail

      • withParent

        public LaunchImpl.TreeItem withParent​(@Nullable
                                              io.reactivex.Maybe<java.lang.String> parent)
        Sets the parent item promise for this tree node.
        Parameters:
        parent - the parent item ID promise, may be null for a root
        Returns:
        this instance for chaining
      • addToQueue

        public void addToQueue​(@Nonnull
                               io.reactivex.Completable completable)
        Adds a completion task representing a child operation to this node.
        Parameters:
        completable - the child completion task to add
      • getChildren

        @Nonnull
        public java.util.List<io.reactivex.Completable> getChildren()
        Returns a snapshot list of child completion tasks.
        Returns:
        a new list containing this node's child completables
      • getParent

        @Nullable
        public io.reactivex.Maybe<java.lang.String> getParent()
        Returns the parent item ID promise or null if this is a root.
        Returns:
        the parent item ID promise or null