org.springframework.util.SortProperties Maven / Gradle / Ivy
package org.springframework.util;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.springframework.util.Assert;
import org.springframework.util.comparator.NullSafeComparator;
public class SortProperties extends Properties {
private static final long serialVersionUID = -8842314902328663478L;
protected final CharSequence suffix;
protected final CharSequence prefix;
public SortProperties(Map map) {
this(map, "", "");
}
public SortProperties(Map map, CharSequence suffix, CharSequence prefix) {
Assert.notEmpty(map, "'map' must have entries");
Assert.notNull(this.suffix = suffix, "'suffix' must not be null");
Assert.notNull(this.prefix = prefix, "'prefix' must not be null");
putAll(map);
}
/**
* @see java.util.TreeSet#TreeSet(java.util.Collection)
*/
@Override
public synchronized Enumeration