コード例 #1
0
ファイル: BasicBSONObject.java プロジェクト: AlfieC/HCTeams-1
 public int getInt(final String key, final int def) {
   final Object foo = this.get(key);
   if (foo == null) {
     return def;
   }
   return BSON.toInt(foo);
 }
コード例 #2
0
ファイル: BasicBSONObject.java プロジェクト: AlfieC/HCTeams-1
 public int getInt(final String key) {
   final Object o = this.get(key);
   if (o == null) {
     throw new NullPointerException("no value for: " + key);
   }
   return BSON.toInt(o);
 }