max()/minI() supported
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
var max_width = 0.0f
|
||||
<caret>for (i in 0..lineCount - 1) {
|
||||
val width = getLineWidth(i)
|
||||
if (width > max_width) {
|
||||
max_width = width
|
||||
}
|
||||
}
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
val <caret>max_width = (0..lineCount - 1)
|
||||
.map { getLineWidth(it) }
|
||||
.max()
|
||||
?: 0.0f
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
val <caret>max_width = (0..lineCount - 1)
|
||||
.asSequence()
|
||||
.map { getLineWidth(it) }
|
||||
.max()
|
||||
?: 0.0f
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
var max_width = 0.0f
|
||||
<caret>for (i in 0..lineCount - 1) {
|
||||
val width = getLineWidth(i)
|
||||
if (max_width < width) {
|
||||
max_width = width
|
||||
}
|
||||
}
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
val <caret>max_width = (0..lineCount - 1)
|
||||
.map { getLineWidth(it) }
|
||||
.max()
|
||||
?: 0.0f
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.max()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.max()'"
|
||||
fun getMaxLineWidth(lineCount: Int): Float {
|
||||
val <caret>max_width = (0..lineCount - 1)
|
||||
.asSequence()
|
||||
.map { getLineWidth(it) }
|
||||
.max()
|
||||
?: 0.0f
|
||||
return max_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Float = TODO()
|
||||
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
var min_width = Double.MAX_VALUE
|
||||
<caret>for (i in 0..lineCount - 1) {
|
||||
val width = getLineWidth(i)
|
||||
if (width < min_width) {
|
||||
min_width = width
|
||||
}
|
||||
}
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
val <caret>min_width = (0..lineCount - 1)
|
||||
.map { getLineWidth(it) }
|
||||
.min()
|
||||
?: Double.MAX_VALUE
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
val <caret>min_width = (0..lineCount - 1)
|
||||
.asSequence()
|
||||
.map { getLineWidth(it) }
|
||||
.min()
|
||||
?: Double.MAX_VALUE
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
var min_width = Double.MAX_VALUE
|
||||
<caret>for (i in 0..lineCount - 1) {
|
||||
val width = getLineWidth(i)
|
||||
if (min_width > width) {
|
||||
min_width = width
|
||||
}
|
||||
}
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
val <caret>min_width = (0..lineCount - 1)
|
||||
.map { getLineWidth(it) }
|
||||
.min()
|
||||
?: Double.MAX_VALUE
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.min()'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.min()'"
|
||||
fun getMinLineWidth(lineCount: Int): Double {
|
||||
val <caret>min_width = (0..lineCount - 1)
|
||||
.asSequence()
|
||||
.map { getLineWidth(it) }
|
||||
.min()
|
||||
?: Double.MAX_VALUE
|
||||
return min_width
|
||||
}
|
||||
|
||||
fun getLineWidth(i: Int): Double = TODO()
|
||||
Reference in New Issue
Block a user