package ru.amizichenko.tracker.services;

/**
 * Created by defo on 26.11.16.
 */
public class SimpleArray<T> {

    private Object[] objects;
    private int index = 0;

    public SimpleArray(int size) {
        this.objects = new Object[size];
    }

    public void add(T value) {
        this.objects[index++] = value;
    }

    public void update(int index, T value) {
        this.objects[index] = value;
    }

    public void delete(int index) {
        /*if (index >= 0 && index < objects.length) {
            Object[] copy = new Object[objects.length-1];
            System.arraycopy(objects, 0, copy, 0, index);
            System.arraycopy(objects, index+1, copy, index, objects.length-index-1);
            this.objects = copy;
        }*/
        this.objects[index] = null;
    }

    public T get(int index) {
        return (T) this.objects[index];
    }

}
@@ -453,308 +453,8 @@
 ) %7B%0A
-        /*if (index %3E= 0 && index %3C objects.length) %7B%0A            Object%5B%5D copy = new Object%5Bobjects.length-1%5D;%0A            System.arraycopy(objects, 0, copy, 0, index);%0A            System.arraycopy(objects, index+1, copy, index, objects.length-index-1);%0A            this.objects = copy;%0A        %7D*/%0A
     
@@ -485,16 +485,16 @@
 = null;%0A
+
     %7D%0A%0A 
@@ -569,9 +569,10 @@
 %0A    %7D%0A%0A
-
 %7D
+%0A

Update SimpleArray.java