Search in sources :

Example 11 with NumberFormatException

use of java.lang.NumberFormatException in project clochure by videlalvaro.

the class LispReader method readNumber.

private static Object readNumber(PushbackReader r, char initch) {
    StringBuilder sb = new StringBuilder();
    sb.append(initch);
    for (; ; ) {
        int ch = read1(r);
        if (ch == -1 || isWhitespace(ch) || isMacro(ch)) {
            unread(r, ch);
            break;
        }
        sb.append((char) ch);
    }
    String s = sb.toString();
    Object n = matchNumber(s);
    if (n == null)
        throw new NumberFormatException("Invalid number: " + s);
    return n;
}
Also used : StringBuilder(java.lang.StringBuilder) NumberFormatException(java.lang.NumberFormatException) Object(java.lang.Object) String(java.lang.String)

Aggregations

NumberFormatException (java.lang.NumberFormatException)11 AlertDialog (android.app.AlertDialog)3 DialogInterface (android.content.DialogInterface)3 Paint (android.graphics.Paint)3 Point (android.graphics.Point)3 EditText (android.widget.EditText)3 LinearLayout (android.widget.LinearLayout)3 TextView (android.widget.TextView)3 ServiceState (android.telephony.ServiceState)2 Object (java.lang.Object)2 String (java.lang.String)2 StringBuilder (java.lang.StringBuilder)2 Bundle (android.os.Bundle)1 SeekBar (android.widget.SeekBar)1 OnSeekBarChangeListener (android.widget.SeekBar.OnSeekBarChangeListener)1 ConfigurationException (com.sun.identity.plugin.configuration.ConfigurationException)1 DataStoreProviderException (com.sun.identity.plugin.datastore.DataStoreProviderException)1 ActionMapper (com.sun.identity.saml.plugins.ActionMapper)1 AttributeMapper (com.sun.identity.saml.plugins.AttributeMapper)1 ConsumerSiteAttributeMapper (com.sun.identity.saml.plugins.ConsumerSiteAttributeMapper)1