public int optInt ( String key ) { LazyNode token = getOptionalFieldToken ( key ) ; if ( token == null ) return 0 ; if ( token . type == LazyNode . VALUE_NULL ) return 0 ; return token . getIntValue ( ) ; }
Returns the integer value stored in this object for the given key . Returns 0 if there is no such key .