01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.util;
07:
08: import java.util.Collections;
09: import java.util.Enumeration;
10: import java.util.Properties;
11: import java.util.Vector;
12:
13: /**
14: * Sorted properties file.
15: * This implementation requires that store() internally calls keys().
16: */
17: public class SortedProperties extends Properties {
18:
19: private static final long serialVersionUID = 5657650728102821923L;
20:
21: public synchronized Enumeration keys() {
22: Vector v = new Vector(keySet());
23: Collections.sort(v);
24: return v.elements();
25: }
26:
27: }
|