All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.doxia.site.Image Maven / Gradle / Ivy

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;

/**
 * An image.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class Image
    implements java.io.Serializable, java.lang.Cloneable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * The source location.
     */
    private String src;

    /**
     * Where to place the image relative to the displayed name
     * (left or right).
     */
    private String position = "left";

    /**
     * The alternative text to use.
     */
    private String alt;

    /**
     * The width to use.
     */
    private String width;

    /**
     * The height to use.
     */
    private String height;

    /**
     * The style to use.
     */
    private String style;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method clone.
     * 
     * @return Image
     */
    public Image clone()
    {
        try
        {
            Image copy = (Image) 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 );
        }
    } //-- Image clone()

    /**
     * Method equals.
     * 
     * @param other a other object.
     * @return boolean
     */
    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }

        if ( !( other instanceof Image ) )
        {
            return false;
        }

        Image that = (Image) other;
        boolean result = true;

        result = result && ( getSrc() == null ? that.getSrc() == null : getSrc().equals( that.getSrc() ) );
        result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
        result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) );
        result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) );
        result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) );
        result = result && ( getStyle() == null ? that.getStyle() == null : getStyle().equals( that.getStyle() ) );

        return result;
    } //-- boolean equals( Object )

    /**
     * Get the alternative text to use.
     * 
     * @return String
     */
    public String getAlt()
    {
        return this.alt;
    } //-- String getAlt()

    /**
     * Get the height to use.
     * 
     * @return String
     */
    public String getHeight()
    {
        return this.height;
    } //-- String getHeight()

    /**
     * Get where to place the image relative to the displayed name
     * (left or right).
     * 
     * @return String
     */
    public String getPosition()
    {
        return this.position;
    } //-- String getPosition()

    /**
     * Get the source location.
     * 
     * @return String
     */
    public String getSrc()
    {
        return this.src;
    } //-- String getSrc()

    /**
     * Get the style to use.
     * 
     * @return String
     */
    public String getStyle()
    {
        return this.style;
    } //-- String getStyle()

    /**
     * Get the width to use.
     * 
     * @return String
     */
    public String getWidth()
    {
        return this.width;
    } //-- String getWidth()

    /**
     * Method hashCode.
     * 
     * @return int
     */
    public int hashCode()
    {
        int result = 17;

        result = 37 * result + ( src != null ? src.hashCode() : 0 );
        result = 37 * result + ( position != null ? position.hashCode() : 0 );
        result = 37 * result + ( alt != null ? alt.hashCode() : 0 );
        result = 37 * result + ( width != null ? width.hashCode() : 0 );
        result = 37 * result + ( height != null ? height.hashCode() : 0 );
        result = 37 * result + ( style != null ? style.hashCode() : 0 );

        return result;
    } //-- int hashCode()

    /**
     * Set the alternative text to use.
     * 
     * @param alt a alt object.
     */
    public void setAlt( String alt )
    {
        this.alt = alt;
    } //-- void setAlt( String )

    /**
     * Set the height to use.
     * 
     * @param height a height object.
     */
    public void setHeight( String height )
    {
        this.height = height;
    } //-- void setHeight( String )

    /**
     * Set where to place the image relative to the displayed name
     * (left or right).
     * 
     * @param position a position object.
     */
    public void setPosition( String position )
    {
        this.position = position;
    } //-- void setPosition( String )

    /**
     * Set the source location.
     * 
     * @param src a src object.
     */
    public void setSrc( String src )
    {
        this.src = src;
    } //-- void setSrc( String )

    /**
     * Set the style to use.
     * 
     * @param style a style object.
     */
    public void setStyle( String style )
    {
        this.style = style;
    } //-- void setStyle( String )

    /**
     * Set the width to use.
     * 
     * @param width a width object.
     */
    public void setWidth( String width )
    {
        this.width = width;
    } //-- void setWidth( String )

    /**
     * Method toString.
     * 
     * @return String
     */
    public java.lang.String toString()
    {
        StringBuilder buf = new StringBuilder( 128 );

        buf.append( "src = '" );
        buf.append( getSrc() );
        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( "width = '" );
        buf.append( getWidth() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "height = '" );
        buf.append( getHeight() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "style = '" );
        buf.append( getStyle() );
        buf.append( "'" );

        return buf.toString();
    } //-- java.lang.String toString()

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy