chapter_002/src/main/java/ru/job4j/tracker/Tracker.java
/**
     * Change items in storage
     * @param id item in storage
     * @param item new item
     * @return
     */
Change items in storage
@param id item in storage
@param item new item
@return
Change items in storage @param id item in storage @param item new item @return
public boolean replace(String id, Item item) {
        boolean result = false;
        for (int index = 0; index < position; index++) {
            if (items[index] != null && items[index].getId().equals(id)) {
                items[index] = item;
                items[index].setId(id);
                result = true;
                break;
            }
        }
        return result;
    }
public boolean replace ( String id , Item item ) { boolean result = false ; for ( int index = 0 ; index < position ; index ++ ) { if ( items [ index ] != null && items [ index ] . getId ( ) . equals ( id ) ) { items [ index ] = item ; items [ index ] . setId ( id ) ; result = true ; break ; } } return result ; }
Change items in storage
 @param id item in storage
 @param item new item
 @return
Change items in storage @param id item in storage @param item new item @return