package ru.job4j.pro.generic;

/**
 * This class describes store of roles.
 *
 * @author Kucykh Vasily (mailto:basil135@mail.ru)
 * @version $Id$
 * @since 22.05.2017
 */
public class RoleStore implements IStore<Role> {

    /**
     * parameter sa is instance of SimpleArray class.
     */
    private SimpleArray<Role> sa = new SimpleArray<>();

    /**
     * method add added role to store sa.
     *
     * @param value is value
     * @return true.
     */
    @Override
    public boolean add(Role value) {
        return sa.add(value);
    }

    /**
     * method update updated srcRole by dstRole.
     *
     * @param srcValue is value need to be updated
     * @param dstValue is new value
     * @return true if srcRole was updated
     */
    @Override
    public boolean update(Role srcValue, Role dstValue) {
        for (int count = 0; count < sa.size(); count++) {

            if (sa.get(count).getId().equals(srcValue.getId())) {
                sa.update(count, dstValue);
                return true;
            }

        }

        return false;

    }

    /**
     * method remove from sa Role value if exist.
     *
     * @param value is value need to be removed
     * @return true if value deleted from sa
     */
    @Override
    public boolean remove(Role value) {
        return sa.remove(value);
    }

    /**
     * method return array of Roles.
     *
     * @return array of roles
     */
    public Object[] toArray() {
        return sa.toArray();
    }

    /**
     * method return array of roles as array of input type.
     *
     * @param input is input array.
     * @return array
     */
    public Role[] toArray(Role[] input) {
        return sa.toArray(input);
    }

}

@@ -191,1532 +191,35 @@
 ore 
-implements IStore%3CRole%3E %7B%0A%0A    /**%0A     * parameter sa is instance of SimpleArray class.%0A     */%0A    private SimpleArray%3CRole%3E sa = new SimpleArray%3C%3E();%0A%0A    /**%0A     * method add added role to store sa.%0A     *%0A     * @param value is value%0A     * @return true.%0A     */%0A    @Override%0A    public boolean add(Role value) %7B%0A        return sa.add(value);%0A    %7D%0A%0A    /**%0A     * method update updated srcRole by dstRole.%0A     *%0A     * @param srcValue is value need to be updated%0A     * @param dstValue is new value%0A     * @return true if srcRole was updated%0A     */%0A    @Override%0A    public boolean update(Role srcValue, Role dstValue) %7B%0A        for (int count = 0; count %3C sa.size(); count++) %7B%0A%0A            if (sa.get(count).getId().equals(srcValue.getId())) %7B%0A                sa.update(count, dstValue);%0A                return true;%0A            %7D%0A%0A        %7D%0A%0A        return false;%0A%0A    %7D%0A%0A    /**%0A     * method remove from sa Role value if exist.%0A     *%0A     * @param value is value need to be removed%0A     * @return true if value deleted from sa%0A     */%0A    @Override%0A    public boolean remove(Role value) %7B%0A        return sa.remove(value);%0A    %7D%0A%0A    /**%0A     * method return array of Roles.%0A     *%0A     * @return array of roles%0A     */%0A    public Object%5B%5D toArray() %7B%0A        return sa.toArray();%0A    %7D%0A%0A    /**%0A     * method return array of roles as array of input type.%0A     *%0A     * @param input is input array.%0A     * @return array%0A     */%0A    public Role%5B%5D toArray(Role%5B%5D input) %7B%0A        return sa.toArray(input);%0A    %7D%0A%0A%7D%0A
+extends AbstractStore%3CRole%3E %7B%0A%7D

Refactor RoleStore.java - clear all class (deleted all methods and fields)