org.apache.maven.doxia.site.LinkItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doxia-site-model Show documentation
Show all versions of doxia-site-model Show documentation
The Site Model handles the descriptor for sites, also known as site.xml.
The newest version!
/*
=================== DO NOT EDIT THIS FILE ====================
Generated by Modello 2.4.0,
any modifications will be overwritten.
==============================================================
*/
package org.apache.maven.doxia.site;
/**
* A link in the navigation.
*
* @version $Revision$ $Date$
*/
@SuppressWarnings( "all" )
public class LinkItem
implements java.io.Serializable, java.lang.Cloneable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* The name to display for the link.
*/
private String name;
/**
* The href to use for the link.
*/
private String href;
/**
* Where the new document will be displayed when the user
* follows a link, i.e. _blank opens the new document in a new
* window.
*/
private String target;
/**
* The image for the link.
*/
private Image image;
//-----------/
//- Methods -/
//-----------/
/**
* Method clone.
*
* @return LinkItem
*/
public LinkItem clone()
{
try
{
LinkItem copy = (LinkItem) super.clone();
if ( this.image != null )
{
copy.image = (Image) this.image.clone();
}
return copy;
}
catch ( java.lang.Exception ex )
{
throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
+ " does not support clone()" ).initCause( ex );
}
} //-- LinkItem clone()
/**
* Method equals.
*
* @param other a other object.
* @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 && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) );
result = result && ( getImage() == null ? that.getImage() == null : getImage().equals( that.getImage() ) );
return result;
} //-- boolean equals( Object )
/**
* Get the href to use for the link.
*
* @return String
*/
public String getHref()
{
return this.href;
} //-- String getHref()
/**
* Get the image for the link.
*
* @return Image
*/
public Image getImage()
{
return this.image;
} //-- Image getImage()
/**
* Get the name to display for the link.
*
* @return String
*/
public String getName()
{
return this.name;
} //-- String getName()
/**
* Get where the new document will be displayed when the user
* follows a link, i.e. _blank opens the new document in a new
* window.
*
* @return String
*/
public String getTarget()
{
return this.target;
} //-- String getTarget()
/**
* Method hashCode.
*
* @return int
*/
public int hashCode()
{
int result = 17;
result = 37 * result + ( name != null ? name.hashCode() : 0 );
result = 37 * result + ( href != null ? href.hashCode() : 0 );
result = 37 * result + ( target != null ? target.hashCode() : 0 );
result = 37 * result + ( image != null ? image.hashCode() : 0 );
return result;
} //-- int hashCode()
/**
* Set the href to use for the link.
*
* @param href a href object.
*/
public void setHref( String href )
{
this.href = href;
} //-- void setHref( String )
/**
* Set the image for the link.
*
* @param image a image object.
*/
public void setImage( Image image )
{
this.image = image;
} //-- void setImage( Image )
/**
* Set the name to display for the link.
*
* @param name a name object.
*/
public void setName( String name )
{
this.name = name;
} //-- void setName( String )
/**
* Set where the new document will be displayed when the user
* follows a link, i.e. _blank opens the new document in a new
* window.
*
* @param target a target object.
*/
public void setTarget( String target )
{
this.target = target;
} //-- void setTarget( String )
/**
* Method toString.
*
* @return String
*/
public java.lang.String toString()
{
StringBuilder buf = new StringBuilder( 128 );
buf.append( "name = '" );
buf.append( getName() );
buf.append( "'" );
buf.append( "\n" );
buf.append( "href = '" );
buf.append( getHref() );
buf.append( "'" );
buf.append( "\n" );
buf.append( "target = '" );
buf.append( getTarget() );
buf.append( "'" );
buf.append( "\n" );
buf.append( "image = '" );
buf.append( getImage() );
buf.append( "'" );
return buf.toString();
} //-- java.lang.String toString()
}