From 2218aa62aeaaa57c5d636887481352c20115aebd Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 12 Mar 2018 09:42:33 +0100 Subject: [PATCH] =?UTF-8?q?TreePrintCondition=20=E2=80=94=20implement=20co?= =?UTF-8?q?ndition=20to=20be=20compatible=20with=20our=20ContainerUtil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/intellij/testFramework/TreePrintCondition.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/TreePrintCondition.java b/platform/testFramework/src/com/intellij/testFramework/TreePrintCondition.java index 756f3a8bfad2..6823c4440c5c 100644 --- a/platform/testFramework/src/com/intellij/testFramework/TreePrintCondition.java +++ b/platform/testFramework/src/com/intellij/testFramework/TreePrintCondition.java @@ -1,19 +1,25 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.testFramework; +import com.intellij.openapi.util.Condition; import com.intellij.util.containers.ContainerUtil; import java.util.HashSet; import java.util.Set; import java.util.function.Predicate; -public abstract class TreePrintCondition implements Predicate { +public abstract class TreePrintCondition implements Predicate, Condition { public abstract static class SetBased extends TreePrintCondition { protected Set mySet = new HashSet<>(); public SetBased(String... elements) { ContainerUtil.addAll(mySet, elements); } + + @Override + public final boolean value(String s) { + return test(s); + } } public static class Include extends SetBased {