FileDocCategorySizeDatePackage
IllegalFormatConversionException.javaAPI DocAndroid 1.5 API2590Wed May 06 22:41:04 BST 2009java.util

IllegalFormatConversionException

public class IllegalFormatConversionException extends IllegalFormatException implements Serializable
An {@code IllegalFormatConversionException} will be thrown when the parameter is incompatible with the corresponding format specifier.
see
java.lang.RuntimeException
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private char
c
private Class
arg
Constructors Summary
public IllegalFormatConversionException(char c, Class arg)
Constructs a new {@code IllegalFormatConversionException} with the class of the mismatched conversion and corresponding parameter.

param
c the class of the mismatched conversion.
param
arg the corresponding parameter.


                                                          
         
        this.c = c;
        if (arg == null) {
            throw new NullPointerException();
        }
        this.arg = arg;
    
Methods Summary
public java.lang.ClassgetArgumentClass()
Returns the class of the mismatched parameter.

return
the class of the mismatched parameter.

        return arg;
    
public chargetConversion()
Returns the incompatible conversion.

return
the incompatible conversion.

        return c;
    
public java.lang.StringgetMessage()
Returns the message string of the IllegalFormatConversionException.

return
the message string of the IllegalFormatConversionException.

        StringBuilder buffer = new StringBuilder();
        buffer.append(c);
        buffer.append(" is incompatible with ");
        buffer.append(arg.getName());
        return buffer.toString();