FMLiveSwitchSize Class Reference

A size (width and height). More...

Instance Methods

(NSString *) - description
 Returns a string that represents this instance using format "{width}x{height}". More...
 
(int) - height
 Gets the height. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchSize class. More...
 
(instancetype) - initWithWidth:height:
 Initializes a new instance of the FMLiveSwitchSize class. More...
 
(bool) - isEquivalentWithSize:
 Determines whether the specified size is equivalent. More...
 
(void) - setHeight:
 Sets the height. More...
 
(void) - setWidth:
 Sets the width. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 
(int) - width
 Gets the width. More...
 

Class Methods

(FMLiveSwitchSize *) + empty
 Gets the empty size (0x0). More...
 
(FMLiveSwitchSize *) + fromJsonWithSizeJson:
 Deserializes an instance from JSON. More...
 
(bool) + isEquivalentWithSize1:size2:
 Determines whether the two sizes are equivalent. More...
 
(FMLiveSwitchSize *) + size
 Initializes a new instance of the FMLiveSwitchSize class. More...
 
(FMLiveSwitchSize *) + sizeWithWidth:height:
 Initializes a new instance of the FMLiveSwitchSize class. More...
 
(NSString *) + toJsonWithSize:
 Serializes an instance to JSON. More...
 

Detailed Description

A size (width and height).

Method Documentation

◆ description

- (NSString*) description

Returns a string that represents this instance using format "{width}x{height}".

◆ empty

+ (FMLiveSwitchSize*) empty

Gets the empty size (0x0).

◆ fromJsonWithSizeJson:

+ (FMLiveSwitchSize*) fromJsonWithSizeJson: (NSString *)  sizeJson

Deserializes an instance from JSON.

Parameters
sizeJsonThe JSON to deserialize.
Returns
The deserialized size.

◆ height

- (int) height

Gets the height.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchSize class.

◆ initWithWidth:height:

- (instancetype) initWithWidth: (int)  width
height: (int)  height 

Initializes a new instance of the FMLiveSwitchSize class.

Parameters
widthThe width.
heightThe height.

◆ isEquivalentWithSize1:size2:

+ (bool) isEquivalentWithSize1: (FMLiveSwitchSize *)  size1
size2: (FMLiveSwitchSize *)  size2 

Determines whether the two sizes are equivalent.

Parameters
size1The first size.
size2The second size.

◆ isEquivalentWithSize:

- (bool) isEquivalentWithSize: (FMLiveSwitchSize *)  size

Determines whether the specified size is equivalent.

Parameters
sizeThe size.

◆ setHeight:

- (void) setHeight: (int)  value

Sets the height.

◆ setWidth:

- (void) setWidth: (int)  value

Sets the width.

◆ size

+ (FMLiveSwitchSize*) size

Initializes a new instance of the FMLiveSwitchSize class.

◆ sizeWithWidth:height:

+ (FMLiveSwitchSize*) sizeWithWidth: (int)  width
height: (int)  height 

Initializes a new instance of the FMLiveSwitchSize class.

Parameters
widthThe width.
heightThe height.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJsonWithSize:

+ (NSString*) toJsonWithSize: (FMLiveSwitchSize *)  size

Serializes an instance to JSON.

Parameters
sizeThe size.
Returns
The serialized JSON.

◆ width

- (int) width

Gets the width.