      lastViews[j][i_lastPos] = srcViews[j][valPos]
    i_lastPos++
    @length++
+   length++
    return res
 
   addArray: ->

      size = size << 1
   else
    capacity = INT_SIZE
    lastArr = TDS.Array struct, capacity
    lastViews = lastArr.views
    arrays.push lastArr
    allViews.push lastViews
    sum.push capacity

  begin: ->
   if @length is 0
    return null
   GetArrayListIterator 0, 0

  end: ->
   if @length is 0
    return null
   GetArrayListIterator i_lastArr, i_lastPos

  get: (p) ->
   if p < 0 or p >= @length
    return null
   find p
   arrays[findRes[0]].get findRes[1]

  set: (p, val) ->
   if p < 0 or p >= @length
    return off
   if struct.id isnt val.id
    return off

   findRes[1] = p - sum[bs_l-1]
  return

 #find = find_inline
 ###
 # linear find is faster for small number of arrays
 # binar search should be used after
 #
 #P.S. This seems to be of no use. Having binary search for all cases
 ####
 find_hybrid = (p) ->
  if p < MAX_LINEAR_FIND_INDEX
   find_linear p
  else
   find_binary_search p

 find = find_binary_search

 GetArrayListIterator = (i_arr, i_pos) ->
  arr = null
