本文整理汇总了Java中com.google.android.apps.iosched.io.model.Rooms类的典型用法代码示例。如果您正苦于以下问题:Java Rooms类的具体用法?Java Rooms怎么用?Java Rooms使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Rooms类属于com.google.android.apps.iosched.io.model包,在下文中一共展示了Rooms类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import com.google.android.apps.iosched.io.model.Rooms; //导入依赖的package包/类
public ArrayList<ContentProviderOperation> parse(String json) throws IOException {
final ArrayList<ContentProviderOperation> batch = Lists.newArrayList();
Rooms roomsJson = new Gson().fromJson(json, Rooms.class);
int noOfRooms = roomsJson.rooms.length;
for (int i = 0; i < noOfRooms; i++) {
parseRoom(roomsJson.rooms[i], batch);
}
return batch;
}
示例2: parseRoom
import com.google.android.apps.iosched.io.model.Rooms; //导入依赖的package包/类
private static void parseRoom(Room room, ArrayList<ContentProviderOperation> batch) {
ContentProviderOperation.Builder builder = ContentProviderOperation
.newInsert(ScheduleContract.addCallerIsSyncAdapterParameter(
ScheduleContract.Rooms.CONTENT_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);
batch.add(builder.build());
}