我有一个名为Activity
的RealmObject:
public class Activity extends RealmObject {
@PrimaryKey
public String token;
public RealmList<String> names;
public RealmList<String> units;
public RealmList<Float> points;
}
查询时,我想返回Activity
列表中包含某些值的所有names
项。(不是exactly matches
,非常类似于SQL like
语句。)
我试过
val allActivities = realm.where(Activity::class.java).contains("names", str).findAllAsync()
但我有一个例外:
java.lang.IllegalArgumentException:无效的查询:字段'names'in “活动”类的类型为“STRING_LIST”。
我已尝试过How do I query RealmObject that have RealmList that contains specified value,但上述RealmList
中的类型正在扩展RealmObject
,而String
则未扩展display = figure('Name', 'Images');
continue_button = uicontrol('Style', 'pushbutton', 'String', 'Continue',...
'Callback', %what should I put here%);
blue_button = uicontrol('Style', 'pushbutton', 'String', 'Blue', 'Position', [400 35 75 20], 'Callback', @show_blue);
function [] = show_blue(hObject, eventdata, handles)
imshow(original(:,:,3));
end
for i = 1:length(images)
imshow(imread(images(i).name));
。有什么想法吗?