/** * 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()
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof LinkItem ) ) { return false; } LinkItem that = (LinkItem) other; boolean result = true; result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) ); result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) ); result = result && ( getImg() == null ? that.getImg() == null : getImg().equals( that.getImg() ) ); result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) ); result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) ); result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) ); result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) ); result = result && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) ); result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) ); return result; } //-- boolean equals( Object )
LinkItem linkItem = new LinkItem(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) linkItem.setName( getTrimmedValue( value ) ); linkItem.setHref( getTrimmedValue( value ) ); linkItem.setImg( getTrimmedValue( value ) ); linkItem.setPosition( getTrimmedValue( value ) ); linkItem.setAlt( getTrimmedValue( value ) ); linkItem.setBorder( getTrimmedValue( value ) ); linkItem.setWidth( getTrimmedValue( value ) ); linkItem.setHeight( getTrimmedValue( value ) ); linkItem.setTarget( getTrimmedValue( value ) ); linkItem.setTitle( getTrimmedValue( value ) );
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof MenuItem ) ) { return false; } MenuItem that = (MenuItem) other; boolean result = true; result = result && ( getDescription() == null ? that.getDescription() == null : getDescription().equals( that.getDescription() ) ); result = result && collapse == that.collapse; result = result && ( getRef() == null ? that.getRef() == null : getRef().equals( that.getRef() ) ); result = result && ( getItems() == null ? that.getItems() == null : getItems().equals( that.getItems() ) ); result = result && ( super.equals( other ) ); return result; } //-- boolean equals( Object )
if ( linkItem.getName() != null ) serializer.attribute( NAMESPACE, "name", linkItem.getName() ); if ( linkItem.getHref() != null ) serializer.attribute( NAMESPACE, "href", linkItem.getHref() ); if ( linkItem.getImg() != null ) serializer.attribute( NAMESPACE, "img", linkItem.getImg() ); if ( ( linkItem.getPosition() != null ) && !linkItem.getPosition().equals( "left" ) ) serializer.attribute( NAMESPACE, "position", linkItem.getPosition() ); if ( linkItem.getAlt() != null ) serializer.attribute( NAMESPACE, "alt", linkItem.getAlt() ); if ( linkItem.getBorder() != null ) serializer.attribute( NAMESPACE, "border", linkItem.getBorder() ); if ( linkItem.getWidth() != null ) serializer.attribute( NAMESPACE, "width", linkItem.getWidth() ); if ( linkItem.getHeight() != null )
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; }
buf.append( getName() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "href = '" ); buf.append( getHref() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "img = '" ); buf.append( getImg() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "position = '" ); buf.append( getPosition() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "alt = '" ); buf.append( getAlt() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "border = '" ); buf.append( getBorder() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "width = '" ); buf.append( getWidth() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "height = '" ); buf.append( getHeight() );
/** * 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()