X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libjava%2Fjava%2Futil%2FBitSet.java;h=c56c0d18c7ffc4493bf6c8a6e5ede68026a6f9fe;hb=247711d3b869d5b81e72f4d0aa4b5170a6059a60;hp=38a9be08994fbb5a5a25373857e57497c1b78eb8;hpb=493529eb02c713e09f09633dfffbe5f54fbc23b2;p=pf3gnuchains%2Fgcc-fork.git
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 k
is set in the BitSet (for non-negative values
* of k
) if and only if
*
- *
- * ((k/64) < bits.length) && ((bits[k/64] & (1L << (bit % 64))) != 0) - *+ *
((k/64) < bits.length)
+ * && ((bits[k/64] & (1L << (bit % 64))) != 0)
+ *
*
* Then the following definition of the hashCode method
* would be a correct implementation of the actual algorithm:
*
- * - * 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); - * } - *+ * +
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); +}* * 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:
- * for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) - * { // operate on i here } - *+ * +
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) +{ + // operate on i here +}* * @param from the start location * @return the first true bit, or -1