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

Object net::sf::json::JSONArray::get ( int  index  )  [inline]

Get the object value associated with an index.

Parameters:
index The index must be between 0 and size() - 1.
Returns:
An object value.

Definition at line 1898 of file JSONArray.java.

References elements.

Referenced by _fromArray(), net::sf::json::test::JSONAssert::assertEquals(), fromObject(), toArray(), toCollection(), and toList().

                                  {
      /*
       * Object o = opt( index ); if( o == null ){ throw new JSONException(
       * "JSONArray[" + index + "] not found." ); } return o;
       */
      return this.elements.get( index );
   }


Generated by  Doxygen 1.6.0   Back to index