Le 9/14/13 9:45 AM, Kiran Ayyagari a écrit : > On Sat, Sep 14, 2013 at 1:00 PM, Emmanuel Lécharny <[email protected]>wrote: > >> Hi guys, >> >> >> /** >> * @return The array of stored values. >> */ >> V[] getValues(); >> >> shouldn't this be returning a BTree<V,V>? cause we don't support an array > as a holder of > multiple values
The fact that it's stored as a BTree is implementation dependent, I'm not sure the user of the API should know about it. What the user wants is to get back the stored values, and this is convenient to get back an array. Now, it's probably even better to make the Value class being an Iterable, exactly like the Attribute class. To get all the values, it's just a mater to iterate on the Value. Btw, for clarity, I'll rename the classes and interfaces to Element (and SingleElement, BtreeElement, etc). -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
