Sender: |
|
Date: |
Tue, 22 Mar 2016 14:12:34 -0400 |
MIME-version: |
1.0 (Mac OS X Mail 7.3 \(1878.6\)) |
Reply-To: |
|
Content-type: |
text/plain; charset=iso-8859-1 |
Subject: |
|
From: |
|
In-Reply-To: |
|
Message-ID: |
|
Content-Transfer-Encoding: |
8bit |
Parts/Attachments: |
|
|
On Mar 21, 2016, at 4:08 AM, Christian Meyer <[log in to unmask]> wrote:
> OK, an optional interface with one method getSortComparator() that can
> be implemented by the inspected object could be a practicable solution.
> Adds another interface though.
I've got to think further about pretty ways of doing sorting of properties, but for now I've tweaked the code pretty heavily so that you can just implement the Propertied interface (for now), along these lines:
public Properties properties()
{ return new sim.util.SimpleProperties(this, false).
sortAlphabetically(); }
Or more generally....
public Properties properties()
{ return new sim.util.SimpleProperties(this, false).
sort(new String[]
{
"MinimumIdealTemperature",
"EvaporationConstant",
"MaximumIdealTemperature",
"DiffusionConstant"
}); }
I added some documentation to this effect in the manual too.
Sean
|
|
|