com.wrq.vhi.script.api
Class ScreenSize

java.lang.Object
  extended by com.wrq.vhi.script.api.ScreenSize

public class ScreenSize
extends java.lang.Object

An immutable class that represents the size of the terminal screen.


Constructor Summary
ScreenSize(int height, int width)
          Constructs a ScreenSize object from a height and width.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares one screen size to another.
 int getHeight()
          Gets the height of the terminal screen.
 int getWidth()
          Gets the width of the terminal screen.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScreenSize

public ScreenSize(int height,
                  int width)
Constructs a ScreenSize object from a height and width.

Parameters:
height - height of the terminal screen in characters
width - width of the terminal screen in characters
Method Detail

getHeight

public int getHeight()
Gets the height of the terminal screen.

Returns:
height of the terminal screen in characters

getWidth

public int getWidth()
Gets the width of the terminal screen.

Returns:
width of the terminal screen in characters

equals

public boolean equals(java.lang.Object object)
Compares one screen size to another. A screen size is considered equal if the height and width are equal.

Overrides:
equals in class java.lang.Object
Parameters:
object -
Returns:
true if the screen size is the same, otherwise false

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object