Created
April 6, 2015 13:14
-
-
Save kaiinui/708cb8c34316f5c34298 to your computer and use it in GitHub Desktop.
BundleUtils.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BundleUtils { | |
public static String toString(Bundle bundle) { | |
final StringBuilder sb = new StringBuilder("Bundle: \n"); | |
final Set<String> keys = bundle.keySet(); | |
final Iterator<String> it = keys.iterator(); | |
while (it.hasNext()) { | |
final String key = it.next(); | |
final Object obj = bundle.get(key); | |
// #{KEY} : #{VALUE} (#{TYPE}) | |
sb.append(key).append(" : ").append(obj).append(" (" + obj.getClass().getSimpleName() + ")").append("\n"); | |
} | |
return sb.toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment