Commit b1771c6a by Michael Koch Committed by Tom Tromey

2003-01-10 Michael Koch <konqueror@gmx.de>

	* java/awt/DisplayMode.java
	(equals): Fixed argument type and implementation.

From-SVN: r61184
parent 63af3bd1
2003-01-10 Michael Koch <konqueror@gmx.de>
* java/awt/DisplayMode.java
(equals): Fixed argument type and implementation.
2003-01-07 Tom Tromey <tromey@redhat.com> 2003-01-07 Tom Tromey <tromey@redhat.com>
* include/posix.h (_Jv_platform_usleep): Wrap in ifdef * include/posix.h (_Jv_platform_usleep): Wrap in ifdef
......
/* DisplayMode.java -- a description of display mode configurations /* DisplayMode.java -- a description of display mode configurations
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -140,16 +140,16 @@ public final class DisplayMode ...@@ -140,16 +140,16 @@ public final class DisplayMode
* Test for equality. This returns true for two modes with identical * Test for equality. This returns true for two modes with identical
* parameters. * parameters.
* *
* @param o the object to compare to * @param dm The display mode to compare to
*
* @return true if it is equal * @return true if it is equal
*/ */
public boolean equals(Object o) public boolean equals (DisplayMode dm)
{ {
if (! (o instanceof DisplayMode)) return (width == dm.width
return false; && height == dm.height
DisplayMode m = (DisplayMode) o; && bitDepth == dm.bitDepth
return width == m.width && height == m.height && bitDepth == m.bitDepth && refreshRate == dm.refreshRate);
&& refreshRate == m.refreshRate;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment