예제 #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);
 }