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

org.apache.maven.doxia.site.PublishDate 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;

/**
 * Modify display properties for date published.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class PublishDate
    implements java.io.Serializable, java.lang.Cloneable
{

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

    /**
     * Where to place the date published (left, right,
     * navigation-top, navigation-bottom, bottom).
     */
    private String position = "left";

    /**
     * Date format to use.
     */
    private String format = "yyyy-MM-dd";

    /**
     * 
     *             
     *               The timezone to use. Use system
     * for the default locale for this instance
     *               of the Java Virtual Machine. Refer to
     * java.util.TimeZone for details.
     *             
     *           
     */
    private String timezone = "Etc/UTC";


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

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

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

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

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

        result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
        result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) );
        result = result && ( getTimezone() == null ? that.getTimezone() == null : getTimezone().equals( that.getTimezone() ) );

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

    /**
     * Get date format to use.
     * 
     * @return String
     */
    public String getFormat()
    {
        return this.format;
    } //-- String getFormat()

    /**
     * Get where to place the date published (left, right,
     * navigation-top, navigation-bottom, bottom).
     * 
     * @return String
     */
    public String getPosition()
    {
        return this.position;
    } //-- String getPosition()

    /**
     * Get the timezone to use. Use system for the
     * default locale for this instance
     *               of the Java Virtual Machine. Refer to
     * java.util.TimeZone for details.
     * 
     * @return String
     */
    public String getTimezone()
    {
        return this.timezone;
    } //-- String getTimezone()

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

        result = 37 * result + ( position != null ? position.hashCode() : 0 );
        result = 37 * result + ( format != null ? format.hashCode() : 0 );
        result = 37 * result + ( timezone != null ? timezone.hashCode() : 0 );

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

    /**
     * Set date format to use.
     * 
     * @param format a format object.
     */
    public void setFormat( String format )
    {
        this.format = format;
    } //-- void setFormat( String )

    /**
     * Set where to place the date published (left, right,
     * navigation-top, navigation-bottom, bottom).
     * 
     * @param position a position object.
     */
    public void setPosition( String position )
    {
        this.position = position;
    } //-- void setPosition( String )

    /**
     * Set the timezone to use. Use system for the
     * default locale for this instance
     *               of the Java Virtual Machine. Refer to
     * java.util.TimeZone for details.
     * 
     * @param timezone a timezone object.
     */
    public void setTimezone( String timezone )
    {
        this.timezone = timezone;
    } //-- void setTimezone( String )

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

        buf.append( "position = '" );
        buf.append( getPosition() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "format = '" );
        buf.append( getFormat() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "timezone = '" );
        buf.append( getTimezone() );
        buf.append( "'" );

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy