mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
formatting and better javadoc
This commit is contained in:
parent
3a28d769a7
commit
7bff025626
4 changed files with 108 additions and 59 deletions
|
|
@ -35,7 +35,9 @@ package org.lwjgl;
|
|||
/**
|
||||
* $Id$
|
||||
*
|
||||
* Describes a display mode.
|
||||
* This class encapsulates the properties for a given display mode.
|
||||
* This class is not instantiable, and is aquired from the <code>Display.
|
||||
* getAvailableDisplayModes()</code> method.
|
||||
*
|
||||
* @author cix_foo <cix_foo@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
|
|
@ -43,6 +45,7 @@ package org.lwjgl;
|
|||
|
||||
public final class DisplayMode {
|
||||
|
||||
/** properties of the display mode */
|
||||
public final int width, height, bpp, freq, alpha, depth, stencil;
|
||||
|
||||
/**
|
||||
|
|
@ -61,12 +64,15 @@ public final class DisplayMode {
|
|||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
/**
|
||||
* Tests for <code>DisplayMode</code> equality
|
||||
*
|
||||
* @see java.lang.Object#equals(Object)
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || !(obj instanceof DisplayMode))
|
||||
if (obj == null || !(obj instanceof DisplayMode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DisplayMode dm = (DisplayMode) obj;
|
||||
return dm.width == width
|
||||
|
|
@ -78,14 +84,18 @@ public final class DisplayMode {
|
|||
&& dm.stencil == stencil;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
/**
|
||||
* Retrieves the hashcode for this object
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
public int hashCode() {
|
||||
return width ^ height ^ freq ^ bpp ^ alpha ^ (depth << 8) ^ (stencil << 24);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
/**
|
||||
* Retrieves a String representation of this <code>DisplayMode</code>
|
||||
*
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
|
|
@ -106,5 +116,4 @@ public final class DisplayMode {
|
|||
sb.append("bit stencil");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue