Login | Register
My pages Projects Community openCollabNet

Discussions > dev > RE: [gef-dev] Performance suggestion 1 - Arrays

gef
Discussion topic

Back to topic list

RE: [gef-dev] Performance suggestion 1 - Arrays

Reply

Author ipreuss
Full name Ilja Preuß
Date 2004-01-14 04:59:23 PST
Message Bob Tarling wrote:

> I'm drifting towards the idea of absolute encapsulation by
> just having getFig(int), getFigCount(), getFigPosition(Fig),
> addFig(Fig), removeFig(Fig) methods and not returning any arrays or
> collections.
>
> However I think that so many people are used to dealing with
> arrays and Collections and would prefer a smaller API to give them
> such known objects.
>
> Also that so many other API's take arrays or Collections as
> arguments that they may be more convenient objects to pass to other
> systems.
>
> So I'm not yet agreeing or disagreeing with you I'm still wavering.

I'd certainly prefer the more specific API than handling
arrays/collections.


> Maybe I can do both but the JavaDoc must make the user aware
> that "Fig[] getFigs()" returns a copy not not actual
> instance. So if they want absolute performance they should use the
> other access methods.

Instead of providing both in the same interface, you could also provide
a simple adapter class.

Take care, Ilja


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: dev-help at gef dot tigris dot org

« Previous message in topic | 6 of 7 | Next message in topic »

Messages

Show all messages in topic

[gef-dev] Performance suggestion 1 - Arrays Bob Tarling <bob dot tarling at ntlworld dot com> Bob Tarling <bob dot tarling at ntlworld dot com> 2004-01-11 11:08:30 PST
     RE: [gef-dev] Performance suggestion 1 - Arrays hallvard Hallvard Trætteberg 2004-01-11 11:26:50 PST
         Re: [gef-dev] Performance suggestion 1 - Arrays Bob Tarling <bob dot tarling at ntlworld dot com> Bob Tarling <bob dot tarling at ntlworld dot com> 2004-01-11 11:44:38 PST
             RE: [gef-dev] Performance suggestion 1 - Arrays hallvard Hallvard Trætteberg 2004-01-11 12:24:15 PST
                 Re: [gef-dev] Performance suggestion 1 - Arrays Bob Tarling <bob dot tarling at ntlworld dot com> Bob Tarling <bob dot tarling at ntlworld dot com> 2004-01-11 15:30:26 PST
                     RE: [gef-dev] Performance suggestion 1 - Arrays ipreuss Ilja Preuß 2004-01-14 04:59:23 PST
                         Re: RE: [gef-dev] Performance suggestion 1 - Arrays bob dot tarling at ntlworld dot com bob dot tarling at ntlworld dot com 2004-01-14 05:33:35 PST
Messages per page: