Community
Participate
Working Groups
As stated in the Forum-Message <http://www.eclipse.org/forums/index.php?t=msg&th=201998&start=0&S=be81068d90b5b6b0945dc5560a882115> it would be useful if there would be also an save way to get the size of an array like it allready exists for Strings. Example: int size = ListUtility.size(someByte[]); (someByte[] can be null)
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