SizeKt

Added in 1.1.0

public final class SizeKt


Summary

Public methods

static final int
component1(@NonNull Size receiver)

Returns "width", the first component of this Size.

static final float

Returns "width", the first component of this SizeF.

static final float

Returns "width", the first component of this SizeFCompat.

static final int
component2(@NonNull Size receiver)

Returns "height", the second component of this Size.

static final float

Returns "height", the second component of this SizeF.

static final float

Returns "height", the second component of this SizeFCompat.

Public methods

component1

public static final int component1(@NonNull Size receiver)

Returns "width", the first component of this Size.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize

component1

public static final float component1(@NonNull SizeF receiver)

Returns "width", the first component of this SizeF.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize

component1

public static final float component1(@NonNull SizeFCompat receiver)

Returns "width", the first component of this SizeFCompat.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize

component2

public static final int component2(@NonNull Size receiver)

Returns "height", the second component of this Size.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize

component2

public static final float component2(@NonNull SizeF receiver)

Returns "height", the second component of this SizeF.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize

component2

public static final float component2(@NonNull SizeFCompat receiver)

Returns "height", the second component of this SizeFCompat.

This method allows to use destructuring declarations when working with sizes, for example:

val (w, h) = mySize