fm.liveswitch.Size Class Reference

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

Public Member Functions

int getHeight ()
 Gets the height. More...
 
int getWidth ()
 Gets the width. More...
 
boolean isEquivalent (fm.liveswitch.Size size)
 Determines whether the specified size is equivalent. More...
 
void setHeight (int value)
 Sets the height. More...
 
void setWidth (int value)
 Sets the width. More...
 
 Size ()
 Initializes a new instance of the fm.liveswitch.Size class. More...
 
 Size (int width, int height)
 Initializes a new instance of the fm.liveswitch.Size class. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 
String toString ()
 Returns a string that represents this instance using format "{width}x{height}". More...
 

Static Public Member Functions

static fm.liveswitch.Size fromJson (String sizeJson)
 Deserializes an instance from JSON. More...
 
static fm.liveswitch.Size getEmpty ()
 Gets the empty size (0x0). More...
 
static boolean isEquivalent (fm.liveswitch.Size size1, fm.liveswitch.Size size2)
 Determines whether the two sizes are equivalent. More...
 
static String toJson (final fm.liveswitch.Size size)
 Serializes an instance to JSON. More...
 

Detailed Description

A size (width and height).

Constructor & Destructor Documentation

◆ Size() [1/2]

fm.liveswitch.Size.Size ( )

Initializes a new instance of the fm.liveswitch.Size class.

◆ Size() [2/2]

fm.liveswitch.Size.Size ( int  width,
int  height 
)

Initializes a new instance of the fm.liveswitch.Size class.

Parameters
widthThe width.
heightThe height.

Member Function Documentation

◆ fromJson()

static fm.liveswitch.Size fm.liveswitch.Size.fromJson ( String  sizeJson)
static

Deserializes an instance from JSON.

Parameters
sizeJsonThe JSON to deserialize.
Returns
The deserialized size.

◆ getEmpty()

static fm.liveswitch.Size fm.liveswitch.Size.getEmpty ( )
static

Gets the empty size (0x0).

◆ getHeight()

int fm.liveswitch.Size.getHeight ( )

Gets the height.

◆ getWidth()

int fm.liveswitch.Size.getWidth ( )

Gets the width.

◆ isEquivalent() [1/2]

boolean fm.liveswitch.Size.isEquivalent ( fm.liveswitch.Size  size)

Determines whether the specified size is equivalent.

Parameters
sizeThe size.

◆ isEquivalent() [2/2]

static boolean fm.liveswitch.Size.isEquivalent ( fm.liveswitch.Size  size1,
fm.liveswitch.Size  size2 
)
static

Determines whether the two sizes are equivalent.

Parameters
size1The first size.
size2The second size.

◆ setHeight()

void fm.liveswitch.Size.setHeight ( int  value)

Sets the height.

◆ setWidth()

void fm.liveswitch.Size.setWidth ( int  value)

Sets the width.

◆ toJson() [1/2]

String fm.liveswitch.Size.toJson ( )

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJson() [2/2]

static String fm.liveswitch.Size.toJson ( final fm.liveswitch.Size  size)
static

Serializes an instance to JSON.

Parameters
sizeThe size.
Returns
The serialized JSON.

◆ toString()

String fm.liveswitch.Size.toString ( )

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