@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); }
@Override public int size() { return array.count(); }
@Callback @BindSelector("count") public static int count(NSArray __self__, Selector __cmd__) { return __self__.count(); }