@@ -17,16 +17,22 @@ import org.jetbrains.kotlinx.dataframe.indices
1717import org.jetbrains.kotlinx.dataframe.ncol
1818import org.jetbrains.kotlinx.dataframe.nrow
1919import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
20- import org.jetbrains.kotlinx.dataframe.util.MESSAGE_SHORTCUT_1_0
20+ import org.jetbrains.kotlinx.dataframe.util.MESSAGE_SHORTCUT
21+ import org.jetbrains.kotlinx.dataframe.util.IS_EMPTY_REPLACE
22+ import org.jetbrains.kotlinx.dataframe.util.IS_NOT_EMPTY_REPLACE
23+ import org.jetbrains.kotlinx.dataframe.util.GET_ROW_REPLACE
24+ import org.jetbrains.kotlinx.dataframe.util.GET_ROWS_ITERABLE_REPLACE
25+ import org.jetbrains.kotlinx.dataframe.util.GET_ROWS_RANGE_REPLACE
26+ import org.jetbrains.kotlinx.dataframe.util.GET_ROW_OR_NULL_REPLACE
2127import kotlin.experimental.ExperimentalTypeInference
2228import kotlin.reflect.KProperty
2329import kotlin.reflect.KType
2430
25- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" values().all { it == null } " ) , DeprecationLevel .ERROR )
31+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (IS_EMPTY_REPLACE ) , DeprecationLevel .WARNING )
2632public fun AnyRow.isEmpty (): Boolean = owner.columns().all { it[index] == null }
2733
2834@Suppress(" DEPRECATION_ERROR" )
29- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" values().any { it != null } " ) , DeprecationLevel .ERROR )
35+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (IS_NOT_EMPTY_REPLACE ) , DeprecationLevel .WARNING )
3036public fun AnyRow.isNotEmpty (): Boolean = ! isEmpty()
3137
3238public inline fun <reified R > AnyRow.valuesOf (): List <R > = values().filterIsInstance<R >()
@@ -180,16 +186,16 @@ public fun AnyRow.columnNames(): List<String> = df().columnNames()
180186public fun AnyRow.columnTypes (): List <KType > = df().columnTypes()
181187
182188@Suppress(" DEPRECATION_ERROR" )
183- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" df().getRow(index) " ) , DeprecationLevel .ERROR )
189+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (GET_ROW_REPLACE ) , DeprecationLevel .WARNING )
184190public fun <T > DataRow<T>.getRow (index : Int ): DataRow <T > = getRowOrNull(index)!!
185191
186- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" df().getRows(indices) " ) , DeprecationLevel .ERROR )
192+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (GET_ROWS_ITERABLE_REPLACE ) , DeprecationLevel .WARNING )
187193public fun <T > DataRow<T>.getRows (indices : Iterable <Int >): DataFrame <T > = df().getRows(indices)
188194
189- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" df().getRows(indices) " ) , DeprecationLevel .ERROR )
195+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (GET_ROWS_RANGE_REPLACE ) , DeprecationLevel .WARNING )
190196public fun <T > DataRow<T>.getRows (indices : IntRange ): DataFrame <T > = df().getRows(indices)
191197
192- @Deprecated(MESSAGE_SHORTCUT_1_0 , ReplaceWith (" df().getRowOrNull(index) " ) , DeprecationLevel .ERROR )
198+ @Deprecated(MESSAGE_SHORTCUT , ReplaceWith (GET_ROW_OR_NULL_REPLACE ) , DeprecationLevel .WARNING )
193199public fun <T > DataRow<T>.getRowOrNull (index : Int ): DataRow <T >? {
194200 val df = df()
195201 return if (index >= 0 && index < df.nrow) df[index] else null
0 commit comments