1 |
/* DisplayMode.java -- a description of display mode configurations |
/* DisplayMode.java -- a description of display mode configurations |
2 |
Copyright (C) 2002 Free Software Foundation, Inc. |
Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
140 |
* Test for equality. This returns true for two modes with identical |
* Test for equality. This returns true for two modes with identical |
141 |
* parameters. |
* parameters. |
142 |
* |
* |
143 |
* @param o the object to compare to |
* @param dm The display mode to compare to |
144 |
|
* |
145 |
* @return true if it is equal |
* @return true if it is equal |
146 |
*/ |
*/ |
147 |
public boolean equals(Object o) |
public boolean equals (DisplayMode dm) |
148 |
{ |
{ |
149 |
if (! (o instanceof DisplayMode)) |
return (width == dm.width |
150 |
return false; |
&& height == dm.height |
151 |
DisplayMode m = (DisplayMode) o; |
&& bitDepth == dm.bitDepth |
152 |
return width == m.width && height == m.height && bitDepth == m.bitDepth |
&& refreshRate == dm.refreshRate); |
|
&& refreshRate == m.refreshRate; |
|
153 |
} |
} |
154 |
|
|
155 |
/** |
/** |