public JSONNavi < ? > at ( int index ) { if ( failure ) return this ; if ( ! ( current instanceof List ) ) return failure ( "current node is not an Array" , index ) ; @ SuppressWarnings ( "unchecked" ) List < Object > lst = ( ( List < Object > ) current ) ; if ( index < 0 ) { index = lst . size ( ) + index ; if ( index < 0 ) index = 0 ; } if ( index >= lst . size ( ) ) if ( readonly ) return failure ( "Out of bound exception for index" , index ) ; else { stack . add ( current ) ; path . add ( index ) ; current = null ; missingKey = index ; return this ; } Object next = lst . get ( index ) ; stack . add ( current ) ; path . add ( index ) ; current = next ; return this ; }
Access to the index position .