[ http://jira.andromda.org/browse/JAVA-14?page=comments#action_11611 ]
     
Wouter Zoons commented on JAVA-14:
----------------------------------

won't doing resize the collection anyway ?

the specified initial capacity would for example be 10, but with a load-factor 
of .75 this means that the 8th addition will yield a resize, right ?

so I guess we'll just need to set the load factor to 1 (that way the collection 
is never resized, unless you add an element when the collection is already full)

> Generated enumeration classes must specify sizes of internal collections
> ------------------------------------------------------------------------
>
>          Key: JAVA-14
>          URL: http://jira.andromda.org/browse/JAVA-14
>      Project: Java Cartridge
>         Type: Improvement
>     Reporter: Alex Radzivanovich
>     Assignee: Wouter Zoons
>     Priority: Minor

>
> Enumeration template generates code like this:
> private static final java.util.Map values = new java.util.HashMap();
> private static java.util.List literals = new java.util.ArrayList();
> private static java.util.List names = new java.util.ArrayList();
> I think if I had an enumeration of three literals the following code would be 
> better:
> private static final java.util.Map values = new java.util.HashMap(3);
> private static java.util.List literals = new java.util.ArrayList(3);
> private static java.util.List names = new java.util.ArrayList(3);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to