public final class CrashReportData extends java.util.EnumMap<ReportField,Element>
ReportField
enum values as keys.
This is basically the source of Properties
adapted to extend an
EnumMap instead of Hashtable and with a few tweaks to avoid losing crazy
amounts of android time in the generation of a date comment when storing to file.
Constructor and Description |
---|
CrashReportData()
Constructs a new
Properties object. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(ReportField key)
Returns the property with the specified name.
|
void |
putBoolean(ReportField key,
boolean value) |
void |
putNumber(ReportField key,
java.lang.Number value) |
void |
putString(ReportField key,
java.lang.String value) |
org.json.JSONObject |
toJSON() |
clear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, keySet, put, putAll, remove, size, values
public java.lang.String getProperty(@NonNull ReportField key)
key
- the name of the property to find.null
if it can't be found.public void putString(@NonNull ReportField key, java.lang.String value)
public void putNumber(@NonNull ReportField key, java.lang.Number value)
public void putBoolean(@NonNull ReportField key, boolean value)
@NonNull public org.json.JSONObject toJSON()