public boolean optBoolean ( int index ) { LazyNode token = getOptionalValueToken ( index ) ; if ( token == null ) return false ; if ( token . type == LazyNode . VALUE_NULL ) return false ; if ( token . type == LazyNode . VALUE_TRUE ) return true ; if ( token . type == LazyNode . VALUE_FALSE ) return false ; throw new LazyException ( "Requested value is not a boolean" , token ) ; }
Returns the boolean value stored at the given index or null if there was no such value .