public NSObject[] objectsAtIndexes(int... indexes){
  NSObject[] result=new NSObject[indexes.length];
  Arrays.sort(indexes);
  for (int i=0; i < indexes.length; i++)   result[i]=array[indexes[i]];
  return result;
}

public NSObject [ ] objectsAtIndexes ( int ... indexes ) { NSObject [ ] result = new NSObject [ indexes . length ] ; Arrays . sort ( indexes ) ; for ( int i = 0 ; i < indexes . length ; i ++ ) result [ i ] = array [ indexes [ i ] ] ; return result ; }
returns a new array containing only the values stored at the given indices . the values are sorted by their index .
