code: @Nonnull
    public static <KEYTYPE, DATATYPE extends IHasID <KEYTYPE>> DefaultTreeWithID <KEYTYPE, DATATYPE> buildTree (@Nonnull final Collection <? extends DATATYPE> aAll,
                                                                                                                @Nonnull final IParentProvider <DATATYPE> aParentResolver)
    {
      ValueEnforcer.notNull (aAll, "All");
      ValueEnforcer.notNull (aParentResolver, "ParentResolver");
  
      return _buildTree (new CommonsArrayList <> (aAll), aParentResolver);
    }
docs: A generic method to build a tree of objects.
  
  @param <KEYTYPE>
  The tree key type.
  @param <DATATYPE>
  The tree item value type.
  @param aAll
  A linear list of objects to build the tree from. May not be
  <code>null</code>.
  @param aParentResolver
  The callback method to determine the parental object of a given
  object. May not be <code>null</code>.
  @return A tree with all the objects. Never <code>null</code>.
  @throws IllegalStateException
  if the hierarchy cannot be determined because an object references
  a parent that is not in the list!