Bug 709403 - Part 0: Add getString to ExtendedJSONObject. r=nalexander
authorRichard Newman <rnewman@mozilla.com>
Fri, 02 Mar 2012 17:36:16 -0800
changeset 88471 f9fe533c1e8eb446cc633692822b5839835593aa
parent 88470 6f1239da8d0ed2217c4af69b67b9bea4d94ab66d
child 88472 ddcfb95f7a7cd8a7363a64eb8609a3e484c64fff
push id157
push userMs2ger@gmail.com
push dateWed, 07 Mar 2012 19:27:10 +0000
reviewersnalexander
bugs709403
milestone13.0a1
Bug 709403 - Part 0: Add getString to ExtendedJSONObject. r=nalexander
mobile/android/base/sync/ExtendedJSONObject.java
--- a/mobile/android/base/sync/ExtendedJSONObject.java
+++ b/mobile/android/base/sync/ExtendedJSONObject.java
@@ -122,16 +122,19 @@ public class ExtendedJSONObject {
 
   // Passthrough methods.
   public Object get(String key) {
     return this.object.get(key);
   }
   public Long getLong(String key) {
     return (Long) this.get(key);
   }
+  public String getString(String key) {
+    return (String) this.get(key);
+  }
 
   /**
    * Return a server timestamp value as milliseconds since epoch.
    * @param string
    * @return A Long, or null if the value is non-numeric or doesn't exist.
    */
   public Long getTimestamp(String key) {
     Object val = this.object.get(key);