/** * @since Available in iOS 5.0 and later. */ public static NSObject observeDidFinishGathering(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidFinishGatheringNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } /**
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeDidStartGathering(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidStartGatheringNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } /**
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeDidUpdate(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidUpdateNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } }
public void setSearchScopes(NSArray<NSURL> scopes) { setSearchScopes0(scopes); } public void setSearchScopes(List<String> scopes) {
public void setSearchItems(NSArray<NSMetadataItem> items) { setSearchItems0(items); } public void setSearchItemURLs(NSArray<NSURL> urls) {
public Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> getValueLists() { Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> values = new HashMap<>(); NSDictionary<NSString, NSMetadataQueryAttributeValueTuple> valueLists = getValueLists0(); for (Map.Entry<NSString, NSMetadataQueryAttributeValueTuple> entry : valueLists.entrySet()) { values.put(NSMetadataItemAttribute.valueOf(entry.getKey()), entry.getValue()); } return values; } /*<methods>*/
public List<String> getSearchScopes() { return getSearchScopes0().asStringList(); } public void setSearchItems(NSArray<NSMetadataItem> items) {
public NSArray<NSObject> getSearchItems() { return (NSArray<NSObject>) getSearchItems0(); } public Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> getValueLists() {
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeGatheringProgress(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(GatheringProgressNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } /**
public void setSearchScopes(List<String> scopes) { setSearchScopes0(NSArray.fromStrings(scopes)); } public void setSearchScopes(NSMetadataQueryScope...scopes) {
public void setSearchItemURLs(NSArray<NSURL> urls) { setSearchItems0(urls); } public NSArray<NSObject> getSearchItems() {
public Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> getValueLists() { Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> values = new HashMap<>(); NSDictionary<NSString, NSMetadataQueryAttributeValueTuple> valueLists = getValueLists0(); for (Map.Entry<NSString, NSMetadataQueryAttributeValueTuple> entry : valueLists.entrySet()) { values.put(NSMetadataItemAttribute.valueOf(entry.getKey()), entry.getValue()); } return values; } /*<methods>*/
public List<String> getSearchScopes() { return getSearchScopes0().asStringList(); } public void setSearchItems(NSArray<NSMetadataItem> items) {
public NSArray<NSObject> getSearchItems() { return (NSArray<NSObject>) getSearchItems0(); } public Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> getValueLists() {
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeGatheringProgress(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(GatheringProgressNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } /**
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 void setSearchItemURLs(NSArray<NSURL> urls) { setSearchItems0(urls); } public NSArray<NSObject> getSearchItems() {
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeDidUpdate(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidUpdateNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } }
public Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> getValueLists() { Map<NSMetadataItemAttribute, NSMetadataQueryAttributeValueTuple> values = new HashMap<>(); NSDictionary<NSString, NSMetadataQueryAttributeValueTuple> valueLists = getValueLists0(); for (Map.Entry<NSString, NSMetadataQueryAttributeValueTuple> entry : valueLists.entrySet()) { values.put(NSMetadataItemAttribute.valueOf(entry.getKey()), entry.getValue()); } return values; } /*<methods>*/
/** * @since Available in iOS 5.0 and later. */ public static NSObject observeDidFinishGathering(NSMetadataQuery object, final VoidBlock2<NSMetadataQuery, NSMetadataQueryUpdatedItems> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidFinishGatheringNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NSMetadataQuery)a.getObject(), new NSMetadataQueryUpdatedItems(a.getUserInfo())); } }); } /**