jaroslav@68: /*
jaroslav@68: * Copyright (c) 1994, 2001, Oracle and/or its affiliates. All rights reserved.
jaroslav@68: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@68: *
jaroslav@68: * This code is free software; you can redistribute it and/or modify it
jaroslav@68: * under the terms of the GNU General Public License version 2 only, as
jaroslav@68: * published by the Free Software Foundation. Oracle designates this
jaroslav@68: * particular file as subject to the "Classpath" exception as provided
jaroslav@68: * by Oracle in the LICENSE file that accompanied this code.
jaroslav@68: *
jaroslav@68: * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@68: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@68: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jaroslav@68: * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@68: * accompanied this code).
jaroslav@68: *
jaroslav@68: * You should have received a copy of the GNU General Public License version
jaroslav@68: * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@68: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@68: *
jaroslav@68: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@68: * or visit www.oracle.com if you need additional information or have any
jaroslav@68: * questions.
jaroslav@68: */
jaroslav@68:
jaroslav@68: package java.lang;
jaroslav@68:
jaroslav@68: /**
jaroslav@68: * Thrown to indicate that the application has attempted to convert
jaroslav@68: * a string to one of the numeric types, but that the string does not
jaroslav@68: * have the appropriate format.
jaroslav@68: *
jaroslav@68: * @author unascribed
jaroslav@68: * @see java.lang.Integer#toString()
jaroslav@68: * @since JDK1.0
jaroslav@68: */
jaroslav@68: public
jaroslav@68: class NumberFormatException extends IllegalArgumentException {
jaroslav@68: static final long serialVersionUID = -2848938806368998894L;
jaroslav@68:
jaroslav@68: /**
jaroslav@68: * Constructs a NumberFormatException
with no detail message.
jaroslav@68: */
jaroslav@68: public NumberFormatException () {
jaroslav@68: super();
jaroslav@68: }
jaroslav@68:
jaroslav@68: /**
jaroslav@68: * Constructs a NumberFormatException
with the
jaroslav@68: * specified detail message.
jaroslav@68: *
jaroslav@68: * @param s the detail message.
jaroslav@68: */
jaroslav@68: public NumberFormatException (String s) {
jaroslav@68: super (s);
jaroslav@68: }
jaroslav@68:
jaroslav@68: /**
jaroslav@68: * Factory method for making a NumberFormatException
jaroslav@68: * given the specified input which caused the error.
jaroslav@68: *
jaroslav@68: * @param s the input causing the error
jaroslav@68: */
jaroslav@68: static NumberFormatException forInputString(String s) {
jaroslav@68: return new NumberFormatException("For input string: \"" + s + "\"");
jaroslav@68: }
jaroslav@68: }