public void setLocations(double... locations) { if (locations != null && locations.length > 0) { NSArray<NSNumber> loc = new NSMutableArray<>(); for (double l : locations) { loc.add(NSNumber.valueOf(l)); } setLocations(loc); } } /*<properties>*/
public void setSearchScopes(NSMetadataQueryScope...scopes) { NSMutableArray<NSString> array = new NSMutableArray<>(); for (NSMetadataQueryScope scope : scopes) { array.add(scope.value()); } setSearchScopes0(array); } public List<String> getSearchScopes() {
public NSMutableArray(@MachineSizedUInt long numItems) { super((SkipInit) null); initObject(init(numItems)); } /*</constructors>*/
private void add0(int index, NSObject element) { checkNull(element); if (index < 0 || index > getCount()) { checkIndex(index); } if(element == null) { element = NSNull.getNull(); } insertObject((NSObject)element, index); }
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
@Override public void clear() { ((NSMutableArray<U>) array).removeAllObjects(); }
public static NSArray<?> read(java.io.File file) { return read(file.getAbsolutePath()); }
private void add0(int index, NSObject element) { checkNull(element); if (index < 0 || index > getCount()) { checkIndex(index); } if(element == null) { element = NSNull.getNull(); } insertObject((NSObject)element, index); }
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
@Override public void clear() { ((NSMutableArray<U>) array).removeAllObjects(); }
@Method(selector = "arrayWithContentsOfURL:") public static native NSArray<? extends NSObject> read(NSURL url);
@MarshalsPointer public static long toNative(List<NSCoreDataErrorUserInfoKey> l, long flags) { if (l == null) { return 0L; } NSArray<NSString> array = new NSMutableArray<>(); for (NSCoreDataErrorUserInfoKey o : l) { array.add(o.value()); } return NSObject.Marshaler.toNative(array, flags); } }
@MarshalsPointer public static long toNative(List<AVMetadataIdentifier> l, long flags) { if (l == null) { return 0L; } NSMutableArray<NSString> array = new NSMutableArray<>(); for (AVMetadataIdentifier i : l) { array.add(i.value()); } return NSObject.Marshaler.toNative(array, flags); } }
@Method(selector = "initWithCapacity:") public NSMutableArray(@MachineSizedUInt long numItems) { super((SkipInit) null); initObject(init(numItems)); } /*</constructors>*/
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
@Override public void clear() { ((NSMutableArray<U>) array).removeAllObjects(); }
@Method(selector = "arrayWithContentsOfURL:") public static native NSArray<? extends NSObject> read(NSURL url);
@MarshalsPointer public static long toNative(List<AVAudioSessionLocation> l, long flags) { if (l == null) { return 0L; } NSArray<NSString> array = new NSMutableArray<>(); for (AVAudioSessionLocation o : l) { array.add(o.value()); } return NSObject.Marshaler.toNative(array, flags); } }
@MarshalsPointer public static long toNative(List<NSURLProperty> l, long flags) { if (l == null) { return 0L; } NSMutableArray<NSString> array = new NSMutableArray<>(); for (NSURLProperty i : l) { array.add(i.value()); } return NSObject.Marshaler.toNative(array, flags); } }
@Method(selector = "initWithCapacity:") public NSMutableArray(@MachineSizedUInt long numItems) { super((SkipInit) null); initObject(init(numItems)); } /*</constructors>*/