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

long net::sf::json::JSONArray::optLong ( int  index,
long  defaultValue 
) [inline]

Get the optional long value associated with an index. The defaultValue is returned if there is no value for the index, or if the value is not a number and cannot be converted to a number.

index The index must be between 0 and size() - 1.
defaultValue The default value.
The value.

Definition at line 2257 of file JSONArray.java.

References getLong().

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

Generated by  Doxygen 1.6.0   Back to index