diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-12-10 20:25:39 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-12-10 20:25:39 +0000 |
commit | da66af5951b18b6f5e8752cbbe11f5f842332a33 (patch) | |
tree | a28e126d1415e3689be6c7b2c2d061ae51194195 /java/nio/IntBuffer.java | |
parent | ab90923ee693a17e2e0e37b6ba5a84794c9236de (diff) | |
download | classpath-da66af5951b18b6f5e8752cbbe11f5f842332a33.tar.gz |
2006-12-10 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of generics-branch to HEAD (woohoo!)
Diffstat (limited to 'java/nio/IntBuffer.java')
-rw-r--r-- | java/nio/IntBuffer.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/java/nio/IntBuffer.java b/java/nio/IntBuffer.java index 1e1fe9c75..d6fcb51dd 100644 --- a/java/nio/IntBuffer.java +++ b/java/nio/IntBuffer.java @@ -1,5 +1,5 @@ /* IntBuffer.java -- - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,7 +42,7 @@ package java.nio; * @since 1.4 */ public abstract class IntBuffer extends Buffer - implements Comparable + implements Comparable<IntBuffer> { int array_offset; int[] backing_buffer; @@ -273,7 +273,7 @@ public abstract class IntBuffer extends Buffer { if (obj instanceof IntBuffer) { - return compareTo (obj) == 0; + return compareTo ((IntBuffer) obj) == 0; } return false; @@ -285,10 +285,8 @@ public abstract class IntBuffer extends Buffer * @exception ClassCastException If obj is not an object derived from * <code>IntBuffer</code>. */ - public int compareTo (Object obj) + public int compareTo (IntBuffer other) { - IntBuffer other = (IntBuffer) obj; - int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); |