Пример #1
0
 @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);
 }
Пример #2
0
 @Override
 public boolean contains(Object o) {
   if (o instanceof NSObject) {
     return array.containsObject((NSObject) o);
   }
   return false;
 }
Пример #3
0
 @Override
 public int size() {
   return array.count();
 }
Пример #4
0
 @Callback
 @BindSelector("objectAtIndex:")
 public static NSObject objectAtIndex(NSArray __self__, Selector __cmd__, int index) {
   return __self__.objectAtIndex(index);
 }
Пример #5
0
 @Callback
 @BindSelector("subarrayWithRange:")
 public static NSArray subarrayWithRange(
     NSArray __self__, Selector __cmd__, @ByVal NSRange range) {
   return __self__.subarrayWithRange(range);
 }
Пример #6
0
 @Callback
 @BindSelector("initWithObjects:count:")
 public static @Pointer long initWithObjects(
     NSArray __self__, Selector __cmd__, @Pointer long objects, int count) {
   return __self__.initWithObjects(objects, count);
 }
Пример #7
0
 @Callback
 @BindSelector("initWithArray:")
 public static @Pointer long initWithArray(NSArray __self__, Selector __cmd__, NSArray anArray) {
   return __self__.initWithArray(anArray);
 }
Пример #8
0
 @Callback
 @BindSelector("indexOfObject:")
 public static int indexOfObject(NSArray __self__, Selector __cmd__, NSObject anObject) {
   return __self__.indexOfObject(anObject);
 }
Пример #9
0
 @Callback
 @BindSelector("count")
 public static int count(NSArray __self__, Selector __cmd__) {
   return __self__.count();
 }
Пример #10
0
 @Callback
 @BindSelector("containsObject:")
 public static boolean containsObject(NSArray __self__, Selector __cmd__, NSObject anObject) {
   return __self__.containsObject(anObject);
 }