示例#1
0
 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
 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);
 }