public boolean add ( TYPE_1 element , TYPE_2 VAR_1 ) throws TYPE_3 { if ( element == null ) throw new TYPE_3 ( STRING_1 ) ; for ( TYPE_1 VAR_2 : VAR_3 ) { if ( VAR_2 . METHOD_1 ( element ) ) VAR_3 . remove ( VAR_2 ) ; } if ( VAR_3 . add ( element ) ) { element . METHOD_2 ( VAR_1 ) ; return true ; } return false ; }

public boolean add ( TYPE_1 element , TYPE_2 VAR_1 ) throws TYPE_3 { if ( element == null ) throw new TYPE_3 ( STRING_1 ) ; for ( TYPE_1 VAR_2 : VAR_3 ) { if ( VAR_2 . METHOD_1 ( element ) ) { VAR_3 . remove ( VAR_2 ) ; break ; } } if ( VAR_3 . add ( element ) ) { element . METHOD_2 ( VAR_1 ) ; return true ; } return false ; }
