jw
08/15/2017, 7:28 PMkarelpeeters
08/15/2017, 7:39 PMDalinar
08/24/2017, 3:42 AMkotlin.text
have a replaceFirst
but not a replaceLast
?leosan
08/28/2017, 9:27 AMval items: ArrayList<ListItem> = ArrayList()
listIngredients.groupBy { it.type }.forEach {
items.add(ListItem.HeaderItem(it.key))
items.addAll(it.value.map { ListItem.IngredientItem(it) })
}
or this is fine?karelpeeters
08/28/2017, 9:30 AMIngredientItem
for each ingredient and a HeaderItem
for each type of item, right?leosan
08/28/2017, 9:31 AMleosan
08/28/2017, 9:33 AMkarelpeeters
08/28/2017, 9:34 AMleosan
08/28/2017, 9:35 AMleosan
08/28/2017, 9:35 AMleosan
08/28/2017, 9:36 AMsortedWith
to do thatmarstran
08/31/2017, 2:57 PMmarstran
08/31/2017, 2:58 PMbeholder
08/31/2017, 2:58 PMmarstran
08/31/2017, 2:59 PMuse
method. Not the close
method.jw
08/31/2017, 5:26 PMjw
08/31/2017, 5:27 PMddsoyka
08/31/2017, 5:30 PMjw
08/31/2017, 5:33 PMjw
08/31/2017, 5:33 PMjw
08/31/2017, 5:33 PMjw
08/31/2017, 5:39 PMjw
08/31/2017, 5:39 PMddsoyka
08/31/2017, 5:41 PMilya.gorbunov
09/01/2017, 3:15 PMassertEquals(byteArray, otherByteArray)
and receive the expected result? Or do I need to call Arrays.equals()
instead?
1 reply
You can use array contentEquals otherArray
to compare two arrays by content and then assert that the result is true.
Or you can wrap these arrays in lists and compare that lists:
assertEquals(byteArray.asList(), otherByteArray.asList())
elect
09/03/2017, 2:16 PMIntArray
stlib sugar to IntBuffer
elect
09/03/2017, 2:16 PMDave Leeds
09/03/2017, 6:34 PMStandard.kt
file in the standard library has a lot of utility functions that I use all the time -- like with()
, run()
, apply()
, also()
, takeIf()
and so on. Is there any official (or widely-accepted) term for this family of functions?ilya.gorbunov
09/03/2017, 9:05 PMtakeIf
) are used to introduce the value in a new scope as this
or it
or some other given name.Dave Leeds
09/04/2017, 2:30 AM