本文整理汇总了Java中com.google.samples.apps.iosched.io.model.Room类的典型用法代码示例。如果您正苦于以下问题:Java Room类的具体用法?Java Room怎么用?Java Room使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Room类属于com.google.samples.apps.iosched.io.model包,在下文中一共展示了Room类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Room; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
Uri uri = ScheduleContractHelper.setUriAsCalledFromSyncAdapter(
ScheduleContract.Rooms.CONTENT_URI);
// The list of rooms is not large, so for simplicity we delete all of them and repopulate
list.add(ContentProviderOperation.newDelete(uri).build());
for (Room room : mRooms.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Rooms.ROOM_ID, room.id);
builder.withValue(ScheduleContract.Rooms.ROOM_NAME, room.name);
builder.withValue(ScheduleContract.Rooms.ROOM_FLOOR, room.floor);
list.add(builder.build());
}
}
示例2: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Room; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
Uri uri = ScheduleContract.addCallerIsSyncAdapterParameter(
ScheduleContract.Rooms.CONTENT_URI);
// The list of rooms is not large, so for simplicity we delete all of them and repopulate
list.add(ContentProviderOperation.newDelete(uri).build());
for (Room room : mRooms.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Rooms.ROOM_ID, room.id);
builder.withValue(ScheduleContract.Rooms.ROOM_NAME, room.name);
builder.withValue(ScheduleContract.Rooms.ROOM_FLOOR, room.floor);
list.add(builder.build());
}
}
示例3: process
import com.google.samples.apps.iosched.io.model.Room; //导入依赖的package包/类
@Override
public void process(JsonElement element) {
for (Room room : new Gson().fromJson(element, Room[].class)) {
mRooms.put(room.id, room);
}
}
示例4: process
import com.google.samples.apps.iosched.io.model.Room; //导入依赖的package包/类
@Override
public void process(@NonNull Gson gson, @NonNull JsonElement element) {
for (Room room : gson.fromJson(element, Room[].class)) {
mRooms.put(room.id, room);
}
}