/** * Append a new menu item at root level. * * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. */ @Nonnull default IMenuItemExternal createRootItem (@Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createRootItem (sItemID, new ConstantHasSimpleURL (aURL), aName); }
/** * Append a new menu item below the specified parent. * * @param sParentID * The parent menu item ID to append the item to. May not be * <code>null</code>. * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemExternal createItem (@Nonnull final String sParentID, @Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createItem (sParentID, sItemID, new ConstantHasSimpleURL (aURL), aName); }
/** * Append a new menu item below the specified parent. * * @param aParent * The parent menu item to append the item to. May not be * <code>null</code>. * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemExternal createItem (@Nonnull final IMenuItem aParent, @Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createItem (aParent, sItemID, new ConstantHasSimpleURL (aURL), aName); }