From c4c9770c5f799e314ed4e8b7873b41769daf59c7 Mon Sep 17 00:00:00 2001 From: tromey Date: Sat, 11 Jan 2003 00:51:29 +0000 Subject: 2003-01-10 Michael Koch * java/awt/DisplayMode.java (equals): Fixed argument type and implementation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61184 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/awt/DisplayMode.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/awt/DisplayMode.java b/libjava/java/awt/DisplayMode.java index b988e20be5e..533ab5ef482 100644 --- a/libjava/java/awt/DisplayMode.java +++ b/libjava/java/awt/DisplayMode.java @@ -1,5 +1,5 @@ /* 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. @@ -140,16 +140,16 @@ public final class DisplayMode * Test for equality. This returns true for two modes with identical * parameters. * - * @param o the object to compare to + * @param dm The display mode to compare to + * * @return true if it is equal */ - public boolean equals(Object o) + public boolean equals (DisplayMode dm) { - if (! (o instanceof DisplayMode)) - return false; - DisplayMode m = (DisplayMode) o; - return width == m.width && height == m.height && bitDepth == m.bitDepth - && refreshRate == m.refreshRate; + return (width == dm.width + && height == dm.height + && bitDepth == dm.bitDepth + && refreshRate == dm.refreshRate); } /** -- cgit v1.2.3