Deprecated _tmp functions replaced by library ones

This commit is contained in:
Andrey Breslav
2014-04-29 15:46:11 +04:00
parent 4181bcc319
commit 19719f9747
11 changed files with 13 additions and 104 deletions
@@ -94,8 +94,8 @@ public fun JetClass.isAbstract(): Boolean = isTrait() || hasModifier(JetTokens.A
[suppress("UNCHECKED_CAST")]
public fun <T: PsiElement> PsiElement.replaced(newElement: T): T = replace(newElement) as T
public fun JetElement.blockExpressionsOrSingle(): Iterator<JetElement> =
if (this is JetBlockExpression) getStatements().iterator() else SingleIterator(this)
public fun JetElement.blockExpressionsOrSingle(): Stream<JetElement> =
if (this is JetBlockExpression) getStatements().stream() else listOf(this).stream()
public fun JetElement.outermostLastBlockElement(predicate: (JetElement) -> Boolean = { true }): JetElement? {
return JetPsiUtil.getOutermostLastBlockElement(this) { e -> e != null && predicate(e) }