Class StreamAnyMatch
java.lang.Object
eu.solven.cleanthat.engine.java.refactorer.AJavaParserMutator
eu.solven.cleanthat.engine.java.refactorer.mutators.StreamAnyMatch
- All Implemented Interfaces:
IMutator
,IRuleExternalUrls
Prefer 's.anyMatch(predicate)' over 's.filter(p).findAny().isPresent()'
- Author:
- Benoit Lacelle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()
boolean
protected boolean
processNotRecursively
(com.github.javaparser.ast.Node node) Methods inherited from class eu.solven.cleanthat.engine.java.refactorer.AJavaParserMutator
getThreadJavaParser, onMethodName, optResolvedType, replaceNode, scopeHasRequiredType, scopeHasRequiredType, tryReplace, walkNode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.solven.cleanthat.engine.java.refactorer.meta.IMutator
getCheckstyleId, getIds, getPmdId, isJreOnly, walkNode
Methods inherited from interface eu.solven.cleanthat.engine.java.refactorer.meta.IRuleExternalUrls
checkstyleUrl, jsparrowUrl, pmdUrl, sonarUrl
-
Constructor Details
-
StreamAnyMatch
public StreamAnyMatch()
-
-
Method Details
-
minimalJavaVersion
- Specified by:
minimalJavaVersion
in interfaceIMutator
- Returns:
- the minimal JDK for which this rule is applicable. For instance, any rule related with diamond operator requires JDK1.5
-
isProductionReady
public boolean isProductionReady()- Specified by:
isProductionReady
in interfaceIMutator
-
getId
-
processNotRecursively
protected boolean processNotRecursively(com.github.javaparser.ast.Node node) - Overrides:
processNotRecursively
in classAJavaParserMutator
-