 <p>Extend <code>java.util.Properties</code>, override both <code>put()</code> and <code>keys()</code>:</p> <pre><code>import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Properties; import java.util.HashMap; public class LinkedProperties extends Properties { private final HashSet&lt;Object&gt; keys = new LinkedHashSet&lt;Object&gt;(); public LinkedProperties() { } public Iterable&lt;Object&gt; orderedKeys() { return Collections.list(keys()); } public Enumeration&lt;Object&gt; keys() { return Collections.&lt;Object&gt;enumeration(keys); } public Object put(Object key, Object value) { keys.add(key); return super.put(key, value); } } </code></pre>