示例#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);
 }