Minor: kotlin method body -> expression
authorVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 16 Jan 2018 09:34:25 +0000 (12:34 +0300)
committerVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 16 Jan 2018 09:34:25 +0000 (12:34 +0300)
plugins/stats-collector/src/com/intellij/stats/personalization/impl/DoubleFeatureFactors.kt

index 2cd62b3b81d0c41b3ce61f88b1f5425fe3331c0c..2d7c638f1f9e2a3e622c104ca18f41e2bcedd0df 100644 (file)
@@ -25,19 +25,10 @@ import com.jetbrains.completion.ranker.features.impl.FeatureUtils
  */
 class DoubleFeatureReader(factor: DailyAggregatedDoubleFactor)
     : UserFactorReaderBase(factor) {
  */
 class DoubleFeatureReader(factor: DailyAggregatedDoubleFactor)
     : UserFactorReaderBase(factor) {
-    fun calculateAverageValue(): Double? {
-        return FactorsUtil.calculateAverageByAllDays(factor)
-    }
-
+    fun calculateAverageValue(): Double? = FactorsUtil.calculateAverageByAllDays(factor)
     fun calculateVariance(): Double? = FactorsUtil.calculateVarianceByAllDays(factor)
     fun calculateVariance(): Double? = FactorsUtil.calculateVarianceByAllDays(factor)
-
-    fun min(): Double? {
-        return factor.aggregateMin()["min"]
-    }
-
-    fun max(): Double? {
-        return factor.aggregateMax()["max"]
-    }
+    fun min(): Double? = factor.aggregateMin()["min"]
+    fun max(): Double? = factor.aggregateMax()["max"]
 
     fun undefinedRatio(): Double? {
         val sums = factor.aggregateSum()
 
     fun undefinedRatio(): Double? {
         val sums = factor.aggregateSum()