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

org.jdtaus.commons.sequences.SequenceNotFoundException Maven / Gradle / Ivy

The newest version!
/*
 *  jDTAUS - DTAUS fileformat.
 *  Copyright (c) 2005 Christian Schulte 
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package org.jdtaus.commons.sequences;

import java.util.Locale;

/**
 * Gets thrown when a sequence is not found for a given name.
 *
 * @author Christian Schulte
 * @version $Id: SequenceNotFoundException.java 4748 2008-03-15 15:35:55Z schulte2005 $
 */
public class SequenceNotFoundException extends IllegalArgumentException
{
    //--Constants---------------------------------------------------------------

    /** Serial version UID for backwards compatibility with 1.0.x classes. */
    private static final long serialVersionUID = 7534237573212724983L;

    //---------------------------------------------------------------Constants--
    //--Constructors------------------------------------------------------------

    /**
     * Creates a new {@code SequenceNotFoundException} instance taking the
     * name of the sequence which does not exist.
     *
     * @param sequenceName name of the sequence which does not exist.
     *
     * @throws NullPointerException if {@code sequenceName} is {@code null}.
     */
    public SequenceNotFoundException( final String sequenceName )
    {
        super( SequenceNotFoundExceptionBundle.getInstance().
               getSequenceNotFoundMessage( Locale.getDefault() ).
               format( new Object[] { sequenceName } ) );

        if ( sequenceName == null )
        {
            throw new NullPointerException( "sequenceName" );
        }

        this.sequenceName = sequenceName;
    }

    //------------------------------------------------------------Constructors--
    //--SequenceNotFoundException-----------------------------------------------

    /**
     * Name of the sequence which does not exist.
     * @serial
     */
    private String sequenceName;

    /**
     * Gets the name of the sequence which does not exist.
     *
     * @return the name of the sequence which does not exist.
     */
    public String getSequenceName()
    {
        return this.sequenceName;
    }

    //-----------------------------------------------SequenceNotFoundException--
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy