set

public final Unit set(Size size)

Sets the width and height dimensions base on another size.

Parameters

size

The size from which the dimensions are to be set.

Throws

If any of the dimensions of size is negative.


public final Unit set(Integer width, Integer height)

Sets the width and height coordinates of the size.

Parameters

width

The new width dimension.

height

The new height dimension.