FMLiveSwitchPoint Class Reference

A point (x and y coordinates). More...

Instance Methods

(NSString *) - description
 Returns a string that represents this instance using format "{x},{y}". More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchPoint class. More...
 
(instancetype) - initWithX:y:
 Initializes a new instance of the FMLiveSwitchPoint class. More...
 
(bool) - isEquivalentWithPoint:
 Determines whether the specified point is equivalent. More...
 
(void) - setX:
 Sets the X coordinate. More...
 
(void) - setY:
 Sets the Y coordinate. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 
(int) - x
 Gets the X coordinate. More...
 
(int) - y
 Gets the Y coordinate. More...
 

Class Methods

(FMLiveSwitchPoint *) + empty
 Gets the empty point (0,0). More...
 
(FMLiveSwitchPoint *) + fromJsonWithPointJson:
 Deserializes an instance from JSON. More...
 
(bool) + isEquivalentWithPoint1:point2:
 Determines whether the two points are equivalent. More...
 
(FMLiveSwitchPoint *) + point
 Initializes a new instance of the FMLiveSwitchPoint class. More...
 
(FMLiveSwitchPoint *) + pointWithX:y:
 Initializes a new instance of the FMLiveSwitchPoint class. More...
 
(NSString *) + toJsonWithPoint:
 Serializes an instance to JSON. More...
 

Detailed Description

A point (x and y coordinates).

Method Documentation

◆ description

- (NSString*) description

Returns a string that represents this instance using format "{x},{y}".

◆ empty

+ (FMLiveSwitchPoint*) empty

Gets the empty point (0,0).

◆ fromJsonWithPointJson:

+ (FMLiveSwitchPoint*) fromJsonWithPointJson: (NSString *)  pointJson

Deserializes an instance from JSON.

Parameters
pointJsonThe JSON to deserialize.
Returns
The deserialized point.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchPoint class.

◆ initWithX:y:

- (instancetype) initWithX: (int)  x
y: (int)  y 

Initializes a new instance of the FMLiveSwitchPoint class.

Parameters
xThe X coordinate.
yThe Y coordinate.

◆ isEquivalentWithPoint1:point2:

+ (bool) isEquivalentWithPoint1: (FMLiveSwitchPoint *)  point1
point2: (FMLiveSwitchPoint *)  point2 

Determines whether the two points are equivalent.

Parameters
point1The first point.
point2The second point.

◆ isEquivalentWithPoint:

- (bool) isEquivalentWithPoint: (FMLiveSwitchPoint *)  point

Determines whether the specified point is equivalent.

Parameters
pointThe point.

◆ point

+ (FMLiveSwitchPoint*) point

Initializes a new instance of the FMLiveSwitchPoint class.

◆ pointWithX:y:

+ (FMLiveSwitchPoint*) pointWithX: (int)  x
y: (int)  y 

Initializes a new instance of the FMLiveSwitchPoint class.

Parameters
xThe X coordinate.
yThe Y coordinate.

◆ setX:

- (void) setX: (int)  value

Sets the X coordinate.

◆ setY:

- (void) setY: (int)  value

Sets the Y coordinate.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJsonWithPoint:

+ (NSString*) toJsonWithPoint: (FMLiveSwitchPoint *)  point

Serializes an instance to JSON.

Parameters
pointThe point.
Returns
The serialized JSON.

◆ x

- (int) x

Gets the X coordinate.

◆ y

- (int) y

Gets the Y coordinate.