Sender: |
|
Date: |
Wed, 4 Feb 2009 16:40:07 -0500 |
MIME-version: |
1.0 |
Reply-To: |
|
Content-type: |
text/plain; charset=ISO-8859-1; format=flowed |
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-transfer-encoding: |
7bit |
Comments: |
|
Parts/Attachments: |
|
|
One more:
(5) If your object would like to pretend it's a List, for purposes of
the Properties facility, you can do so without having to implement the
cumbersome java.util.List interface. Instead you can just implement the
much smaller sim.util.Indexed interface.
Sean
Sean Luke wrote:
> The code also has some gizmos which are nice for us but no one else
> provided:
>
> (1) You can define domains for your properties ("this property isn't
> just an integer: it's an integer from 4 to 15").
>
> (2) Objects can tell the properties system "don't examine at me, use
> *this* object for my properties instead" (sim.util.Proxiable).
>
> (3) Objects can tell the properties system "don't use my java bean
> properties, use *this* list of properties instead" (sim.util.Propertied).
>
> (4) Objects can tell the properties system that the number and names of
> the properties are volatile and must be looked up each time. Lists,
> Sets, and Maps are volatile, as can be objects in #3 above if they so
> choose.
>
> None of these gizmos requires any code on your part, they're all optional.
>
> Sean
>
|
|
|