| <html> | |
| <body> | |
| Reports loops which could be collapsed into single <code>Collection.removeIf</code> call. | |
| <p>For example:</p> | |
| <pre> | |
| for (Iterator<String> it = collection.iterator(); it.hasNext(); ) { | |
| String aValue = it.next(); | |
| if(shouldBeRemoved(aValue)) { | |
| it.remove(); | |
| } | |
| } | |
| </pre> | |
| <!-- tooltip end --> | |
| <p>This inspection only reports if the language level of the project or module is 8 or higher</p> | |
| <p><small>New in 2016.3</small></p> | |
| </body> | |
| </html> |