Logo Search packages:      
Sourcecode: libjson-java version File versions

boolean net::sf::json::JSONArray::optBoolean ( int  index,
boolean  defaultValue 
) [inline]

Get the optional boolean value associated with an index. It returns the defaultValue if there is no value at that index or if it is not a Boolean or the String "true" or "false" (case insensitive).

index The index must be between 0 and size() - 1.
defaultValue A boolean default.
The truth.

Definition at line 2145 of file JSONArray.java.

References getBoolean().

         return getBoolean( index );
      }catch( Exception e ){
         return defaultValue;

Generated by  Doxygen 1.6.0   Back to index