jcuda.jnpp.utilnpp
Class DefaultSize

java.lang.Object
  extended by jcuda.jnpp.utilnpp.DefaultSize
All Implemented Interfaces:
Image.Size

public class DefaultSize
extends java.lang.Object
implements Image.Size

Default implementation of a Image.Size


Constructor Summary
DefaultSize(Image.Size rSize)
          Copy constructor
DefaultSize(int nWidthNew, int nHeightNew)
          Creates a new size as specified
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 int nHeight()
          Returns the height
 int nWidth()
          Returns the width
 void set(Image.Size rSize)
          Assignment operator: Set this size to be the same as the given size
 void setHeight(int height)
          Set the height
 void setWidth(int width)
          Set the width
 void swap(Image.Size rSize)
          Swap this size and the given size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSize

DefaultSize(int nWidthNew,
            int nHeightNew)
Creates a new size as specified

Parameters:
nWidthNew - The width
nHeightNew - The height

DefaultSize

DefaultSize(Image.Size rSize)
Copy constructor

Parameters:
rSize - The other size
Method Detail

set

public void set(Image.Size rSize)
Description copied from interface: Image.Size
Assignment operator: Set this size to be the same as the given size

Specified by:
set in interface Image.Size
Parameters:
rSize - The other size

setHeight

public void setHeight(int height)
Description copied from interface: Image.Size
Set the height

Specified by:
setHeight in interface Image.Size
Parameters:
height - The height

setWidth

public void setWidth(int width)
Description copied from interface: Image.Size
Set the width

Specified by:
setWidth in interface Image.Size
Parameters:
width - The width

swap

public void swap(Image.Size rSize)
Description copied from interface: Image.Size
Swap this size and the given size

Specified by:
swap in interface Image.Size
Parameters:
rSize - The other size

nWidth

public int nWidth()
Description copied from interface: Image.Size
Returns the width

Specified by:
nWidth in interface Image.Size
Returns:
The width

nHeight

public int nHeight()
Description copied from interface: Image.Size
Returns the height

Specified by:
nHeight in interface Image.Size
Returns:
The height

hashCode

public int hashCode()
Specified by:
hashCode in interface Image.Size
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface Image.Size
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)