diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-16 21:15:44 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-16 21:15:44 +0000 |
commit | 247711d3b869d5b81e72f4d0aa4b5170a6059a60 (patch) | |
tree | d91d4df026dc21bcf38db7c9f56a8deeaa7301c0 /libjava/java/util/BitSet.java | |
parent | 493529eb02c713e09f09633dfffbe5f54fbc23b2 (diff) | |
download | ppe42-gcc-247711d3b869d5b81e72f4d0aa4b5170a6059a60.tar.gz ppe42-gcc-247711d3b869d5b81e72f4d0aa4b5170a6059a60.zip |
* java/lang/RuntimeException.java: Re-merge with Classpath.
* java/util/ArrayList.java: Likewise.
* java/util/Arrays.java: Likewise.
* java/util/BitSet.java: Likewise.
* java/util/Dictionary.java: Likewise.
* java/util/IdentityHashMap.java: Likewise.
* java/util/MissingResourceException.java: Likewise.
* java/util/Observer.java: Likewise.
* java/util/TooManyListenersException.java: Likewise.
* java/util/zip/DataFormatException.java: Likewise.
* java/util/zip/ZipException.java: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54680 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/BitSet.java')
-rw-r--r-- | libjava/java/util/BitSet.java | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/libjava/java/util/BitSet.java b/libjava/java/util/BitSet.java index 38a9be08994..c56c0d18c7f 100644 --- a/libjava/java/util/BitSet.java +++ b/libjava/java/util/BitSet.java @@ -398,22 +398,24 @@ public class BitSet implements Cloneable, Serializable * bit <code>k</code> is set in the BitSet (for non-negative values * of <code>k</code>) if and only if * - * <pre> - * ((k/64) < bits.length) && ((bits[k/64] & (1L << (bit % 64))) != 0) - * </pre> + * <code>((k/64) < bits.length) + * && ((bits[k/64] & (1L << (bit % 64))) != 0) + * </code> * * Then the following definition of the hashCode method * would be a correct implementation of the actual algorithm: * - * <pre> - * public int hashCode() { - * long h = 1234; - * for (int i = bits.length-1; i>=0; i--) { - * h ^= bits[i] * (i + 1); - * } - * return (int)((h >> 32) ^ h); - * } - * </pre> + * +<pre>public int hashCode() +{ + long h = 1234; + for (int i = bits.length-1; i >= 0; i--) + { + h ^= bits[i] * (i + 1); + } + + return (int)((h >> 32) ^ h); +}</pre> * * Note that the hash code values changes, if the set is changed. * @@ -526,10 +528,11 @@ public class BitSet implements Cloneable, Serializable * Returns the index of the next true bit, from the specified bit * (inclusive). If there is none, -1 is returned. You can iterate over * all true bits with this loop:<br> - * <pre> - * for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) - * { // operate on i here } - * </pre> + * +<pre>for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) +{ + // operate on i here +}</pre> * * @param from the start location * @return the first true bit, or -1 |