public void updateItem ( T item ) { if ( _items == null ) { return ; } int idx = _items . indexOf ( item ) ; if ( idx == - 1 ) { _items . add ( 0 , item ) ; } else { _items . set ( idx , item ) ; } }
Updates the specified item if found in the model prepends it otherwise .