Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/util/BitSet.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    399399   * of <code>k</code>) if and only if
    400400   *
    401    * <pre>
    402    * ((k/64) < bits.length) && ((bits[k/64] & (1L << (bit % 64))) != 0)
    403    * </pre>
     401   * <
     402   * (bit % 64))) != 0)
     403   * </e>
    404404   *
    405405   * Then the following definition of the hashCode method
    406406   * would be a correct implementation of the actual algorithm:
    407407   *
    408    * <pre>
    409    * public int hashCode() {
    410    *     long h = 1234;
    411    *     for (int i = bits.length-1; i>=0; i--) {
    412    *         h ^= bits[i] * (i + 1);
    413    *     }
    414    *     return (int)((h >> 32) ^ h);
    415    * }
    416    * </pre>
     408   *
     409<pre>public int hashCode()
     410{
     411  long h = 1234;
     412  for (int i = bits.length-1; i &gt;= 0; i--)
     413  {
     414    h ^= bits[i] * (i + 1);
     415  }
     416
     417  return (int)((h >> 32) ^ h);
     418}</pre>
    417419   *
    418420   * Note that the hash code values changes, if the set is changed.
     
    527529   * (inclusive). If there is none, -1 is returned. You can iterate over
    528530   * all true bits with this loop:<br>
    529    * <pre>
    530    * for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1))
    531    *   { // operate on i here }
    532    * </pre>
     531   *
     532<pre>for (int i = bs.nextSetBit(0); i &gt;= 0; i = bs.nextSetBit(i + 1))
     533{
     534  // operate on i here
     535}</pre>
    533536   *
    534537   * @param from the start location
Note: See TracChangeset for help on using the changeset viewer.