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

org.jdtaus.commons.sequences.CapacityLimitException 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 whenever the directories capacity limit has been reached.
 *
 * @author Christian Schulte
 * @version $Id: CapacityLimitException.java 4748 2008-03-15 15:35:55Z schulte2005 $
 */
public class CapacityLimitException extends Exception
{
    //--Constants---------------------------------------------------------------

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

    //---------------------------------------------------------------Constants--
    //--CapacityLimitException--------------------------------------------------

    /**
     * Capacity limit value.
     * @serial
     */
    private long capacityLimit;

    /**
     * Creates a new {@code CapacityLimitException} taking the capacity limit
     * value.
     *
     * @param capacityLimit the capacity limit to report.
     */
    public CapacityLimitException( final long capacityLimit )
    {
        super( CapacityLimitExceptionBundle.getInstance().
               getCapacityLimitMessage( Locale.getDefault() ).
               format( new Object[] { Long.valueOf( capacityLimit ) } ) );

        this.capacityLimit = capacityLimit;
    }

    /**
     * Gets the reported capacity limit.
     *
     * @return the reported capacity limit.
     */
    public long getCapacityLimit()
    {
        return this.capacityLimit;
    }

    //--------------------------------------------------CapacityLimitException--
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy