| Summary: | save retrieval of size of an array [] | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Stephan Leicht Vogt <stephan.leichtvogt> |
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | zimmermann |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Stephan Leicht Vogt
This will be added for the June 2011 release either in ListUtility, CollectionUtility or ArrayUtility Done as ListUtility.length.
junit test:
assertEquals(-1, ListUtility.length(null));
assertEquals(3, ListUtility.length(new int[3]));
assertEquals(3, ListUtility.length(new int[3][4]));
assertEquals(3, ListUtility.length(new String[3]));
assertEquals(3, ListUtility.length(new String[3][4]));
assertEquals(3, ListUtility.length(new ArrayList<String>(Arrays.asList(new String[]{"a", "b", "c"}))));
assertEquals(0, ListUtility.length(new HashMap<String, String>()));
shipped with eclipse scout 3.7.0 |