java.lang.Object
eu.solven.cleanthat.engine.java.refactorer.AJavaParserMutator
eu.solven.cleanthat.engine.java.refactorer.mutators.StreamAnyMatch
All Implemented Interfaces:
IMutator, IRuleExternalUrls

public class StreamAnyMatch extends AJavaParserMutator implements IMutator
Prefer 's.anyMatch(predicate)' over 's.filter(p).findAny().isPresent()'
Author:
Benoit Lacelle
  • Constructor Details

    • StreamAnyMatch

      public StreamAnyMatch()
  • Method Details

    • minimalJavaVersion

      public String minimalJavaVersion()
      Specified by:
      minimalJavaVersion in interface IMutator
      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 interface IMutator
    • getId

      public String getId()
      Specified by:
      getId in interface IMutator
    • processNotRecursively

      protected boolean processNotRecursively(com.github.javaparser.ast.Node node)
      Overrides:
      processNotRecursively in class AJavaParserMutator