java.util

Class MissingFormatWidthException

Implemented Interfaces:
Serializable

public class MissingFormatWidthException
extends IllegalFormatException

Unchecked exception thrown when the format width is required.

Unless otherwise specified, passing a null argument to anyg method or constructor in this class will cause a NullPointerException to be thrown.

Since:
1.5
See Also:
Serialized Form

Constructor Summary

MissingFormatWidthException(String s)
Constructs an instance of this class with the specified format specifier.

Method Summary

String
getFormatSpecifier()
Returns the format specifier which does not have a width.
String
getMessage()

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

MissingFormatWidthException

public MissingFormatWidthException(String s)
Constructs an instance of this class with the specified format specifier.
Parameters:
s - The format specifier which does not have a width
Usages and Demos :

View More Examples of MissingFormatWidthException(String s)
   1:         if ((isFlag('-') || isFlag('0')) && width == -1) {
   2:             throw new MissingFormatWidthException(specifier);
   3:         }
   4:     }

View Full Code Here

Method Details

getFormatSpecifier

public String getFormatSpecifier()
Returns the format specifier which does not have a width.
Returns:
The format specifier which does not have a width

getMessage

public String getMessage()
Overrides:
getMessage in interface Throwable