Clayton
On Sun, Mar 30, 2008 at 4:05 AM, sm_zl_kimi <smzl...@gmail.com> wrote:
> any comments?
>
Let me do some looking into the code in CPSRecord. The documentation
is horrible (my fault), but I believe that there's a mechanism by
which we can explicitly set a property w/ just a value and the
property number. As I recall, though, that would bypass any special
processing that is done by all of the setXXX() methods. (Although --
off the top of my head, again -- I can't remember if any of the setXXX
methods do any special processing.)
I do appreciate the code, though!
Clayton
CPSPlanting and CPSCrop both inherit from CPSRecord, which defines two methods:
public <T> void set( int prop, T value ) { set( prop, value, false ); }
public <T> void set( int prop, T value, boolean force ) { set(
getDatum( prop ), value, force ); }
You could use these methods to skip the calls to the setXXX methods
which you created and think are ugly.
For instance, instead of this:
setCropsAndVarieties(crop,propNumArray.get(i),reader.getValues()[i]);
you could do this:
crop.set( propNumArray.get(i), reader.getValues()[i] );
How's that?
Clayton
2008/4/1, Clayton Carter <croppl...@gmail.com>: