@ SuppressWarnings ( "UnusedDeclaration" ) public void setPatterns ( Iterable < AccountPatternData > patterns ) { this . patterns . clear ( ) ; for ( AccountPatternData data : patterns ) { this . patterns . add ( new AccountPatternData ( data ) ) ; } }
This will make a deep clone of the passed in Iterable . This will also replace any patterns already set .