MASON-INTEREST-L Archives

February 2009

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
Date:
Wed, 4 Feb 2009 16:40:07 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
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
> 

ATOM RSS1 RSS2