/** * Method clone. * * @return Logo */ public Logo clone() { try { Logo copy = (Logo) super.clone(); return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Logo clone()
private List<LinkItem> mergeLinkItemLists( final List<LinkItem> childList, final List<LinkItem> parentList, final URLRebaser urlContainer, boolean cutParentAfterDuplicate ) { List<LinkItem> items = new ArrayList<LinkItem>( childList.size() + parentList.size() ); for ( LinkItem item : parentList ) { if ( !items.contains( item ) && !childList.contains( item ) ) { final LinkItem clone = item.clone(); rebaseLinkItemPaths( clone, urlContainer ); items.add( clone ); } else if ( cutParentAfterDuplicate ) { // if a parent item is found in child, ignore next items (case for breadcrumbs) // merge ( "B > E", "A > B > C > D" ) -> "A > B > E" (notice missing "C > D") // see https://issues.apache.org/jira/browse/DOXIASITETOOLS-62 break; } } for ( LinkItem item : childList ) { if ( !items.contains( item ) ) { items.add( item ); } } return items; }
/** * Method clone. * * @return MenuItem */ public MenuItem clone() { try { MenuItem copy = (MenuItem) super.clone(); if ( this.items != null ) { copy.items = new java.util.ArrayList<MenuItem>(); for ( MenuItem item : this.items ) { copy.items.add( ( (MenuItem) item).clone() ); } } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- MenuItem clone()