Changeset 6717 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2014-01-17T21:33:44+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6661 r6717 952 952 return result; 953 953 } 954 955 /** 956 * Adds the given item at the end of a new copy of given array. 957 * @param array The source array 958 * @param item The item to add 959 * @return An extended copy of {@code array} containing {@code item} as additional last element 960 * @since 6717 961 */ 962 public static <T> T[] addInArrayCopy(T[] array, T item) { 963 T[] biggerCopy = Arrays.copyOf(array, array.length + 1); 964 biggerCopy[array.length] = item; 965 return biggerCopy; 966 } 954 967 }
Note:
See TracChangeset
for help on using the changeset viewer.