From 80008fca156b216b0d4920a830de8512995d4666 Mon Sep 17 00:00:00 2001 From: "moandji.ezana" Date: Fri, 12 Jun 2015 15:25:23 +0200 Subject: [PATCH] Updated Reflection section of readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1876c4c..1ab6458 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,13 @@ Long arrayD = toml.getLong("array[0].d"); // returns 3 ### Reflection -`Toml#entrySet()` returns a Set of Toml.Entry instances exposing the name and value of each entry. +`Toml#entrySet()` returns a Set of [Map.Entry](http://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html) instances. Modifications to the returned Set are not reflected in the Toml instance. Note that Map.Entry#setValue() will throw an UnsupportedOperationException. + +```java +for (Map.Entry entry : myToml.entrySet()) { + System.out.println(entry.getKey() + " " + entry.getValue()); +} +``` You can also convert a Toml instance to a `Map`: