I have a Properties
object and sometimes I need to add other Properties
to it.
Properties myBasicProps = this.getClass.getResourceAsStream(MY_PROPS_PATH);
...
Properties otherProps = new Properties();
otherProps.load(new StringReader(tempPropsString)); //tempPropsString contains my temporary properties
myBasicProps.putAll(otherProps);
I want to sort myBasicProps
after this. I don't want to get all keys and values, sort them with Collections.sort()
and then put it all to a new object. Is there a better way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…