Skip to content
Snippets Groups Projects
Commit 7dddb374 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Add Util to remove a reference from array

parent 07ceb7e4
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,15 @@ public class Util {
return list.size() > 0;
}
public static void removeItemInArray(Object[] array, Object item, Object[] destArray) {
int offset = 0, count = destArray.length;
for (int i = 0; i<count; ++i) {
if (array[i].equals(item))
offset = 1;
destArray[i] = array[i+offset];
}
}
public static void removePositionInArray(Object[] array, int position, Object[] destArray) {
int offset = 0, count = destArray.length;
for (int i = 0; i<count; ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment