Add samples for contentToString and contentDeepToString array operations

This commit is contained in:
Ilya Gorbunov
2017-04-21 21:42:11 +03:00
parent 934b0b8c38
commit ef72371fd7
5 changed files with 117 additions and 1 deletions
@@ -2826,6 +2826,8 @@ public header fun <T> Array<out T>.contentDeepHashCode(): Int
*
* If any of arrays contains itself on any nesting level that reference
* is rendered as `"[...]"` to prevent recursion.
*
* @sample samples.collections.Arrays.ContentOperations.contentDeepToString
*/
@SinceKotlin("1.1")
public header fun <T> Array<out T>.contentDeepToString(): String
@@ -2949,54 +2951,72 @@ public header fun CharArray.contentHashCode(): Int
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun <T> Array<out T>.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun ByteArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun ShortArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun IntArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun LongArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun FloatArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun DoubleArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun BooleanArray.contentToString(): String
/**
* Returns a string representation of the contents of the specified array as if it is [List].
*
* @sample samples.collections.Arrays.ContentOperations.contentToString
*/
@SinceKotlin("1.1")
public header fun CharArray.contentToString(): String