当前位置: 首页>>代码示例>>Java>>正文


Java Room类代码示例

本文整理汇总了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());
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:RoomsHandler.java

示例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());
    }
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:16,代码来源:RoomsHandler.java

示例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);
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:7,代码来源:RoomsHandler.java

示例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);
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:7,代码来源:RoomsHandler.java


注:本文中的com.google.samples.apps.iosched.io.model.Room类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。