本文整理汇总了Java中com.parse.ParseObject.getNumber方法的典型用法代码示例。如果您正苦于以下问题:Java ParseObject.getNumber方法的具体用法?Java ParseObject.getNumber怎么用?Java ParseObject.getNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseObject
的用法示例。
在下文中一共展示了ParseObject.getNumber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventFromParseObject
import com.parse.ParseObject; //导入方法依赖的package包/类
public static Event getEventFromParseObject(@NonNull ParseObject parseObject){
ParseGeoPoint location = parseObject.getParseGeoPoint(Event.LOCATION);
ParseFile parseFile = parseObject.getParseFile(Event.IMAGE);
return new Event(parseObject.getObjectId(),
parseObject.getString(Event.TITLE),
parseObject.getString(Event.DESCRIPTION),
location != null? location.getLatitude() : Event.INVALID_LOCATION,
location != null? location.getLongitude() : Event.INVALID_LOCATION,
parseObject.getString(Event.LOCATION_SUMMARY),
parseObject.getString(Event.LOCATION_DESCRIPTION),
parseFile != null? parseFile.getUrl() : null,
parseObject.getDate(Event.INITIAL_DATE),
// If end date is null, set it as initial date, so we can use it in our order by
parseObject.getDate(Event.END_DATE) != null? parseObject.getDate(Event.END_DATE) : parseObject.getDate(Event.INITIAL_DATE),
parseObject.getInt(Event.TYPE),
parseObject.getBoolean(Event.ENABLED),
(parseObject.getNumber(Event.GOING) != null)? parseObject.getNumber(Event.GOING).longValue() : 0,
parseObject.getString(Event.LINK_URL),
parseObject.getString(Event.LINK_TEXT),
parseObject.getUpdatedAt()
);
}
示例2: get
import com.parse.ParseObject; //导入方法依赖的package包/类
public static Number get(ParseObject parseObject, String key, Number defValue) {
return parseObject.getNumber(key);
}