code: public boolean getBoolean(String key, boolean def) {
          try {
              if (!contains(key)) {
                  return def;
              }
              return (Boolean) get(key);
          } catch (Exception e) {
              return def;
          }
      }
docs: Getter for a boolean value.
  
  @param key The key
  @param def Default value if there is no item at key
  @return A boolean