@SuppressWarnings("unchecked") @Override public U get(int index) { int size = array.count(); if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("index = " + index + ", size = " + size); } return (U) array.objectAtIndex(index); }
@Callback @BindSelector("objectAtIndex:") public static NSObject objectAtIndex(NSArray __self__, Selector __cmd__, int index) { return __self__.objectAtIndex(index); }