3131 * <code>SparseBitSet</code> are labelled <code>
3232 * 0</code> .. <code>Integer.MAX_VALUE − 1</code>.
3333 * After the last set bit of a <code>SparseBitSet</code>, any attempt to find
34- * a subsequent bit (<i>nextSetBit</i>()), will return an value of −1.
34+ * a subsequent bit (<i>nextSetBit</i>()), will return a value of −1.
3535 * If an attempt is made to use <i>nextClearBit</i>(), and all the bits are
3636 * set from the starting position of the search to the bit labelled
3737 * <code>Integer.MAX_VALUE − 1</code>, then similarly −1
@@ -76,7 +76,7 @@ bits to select a bit within a word (and this is considered in places to be
7676 scanning algorithms, meaning that the accesses are always nested three
7777 deep. Again, the change this might be a large amount of work. On the
7878 other hand, these three levels have proven, so far, to provide adequate
79- speed, and an storage efficient way to deal with sparseness.
79+ speed, and a storage efficient way to deal with sparseness.
8080
8181 For simplicity, the level3 blocks and the level2 areas are always "full"
8282 size, i.e., LENGTH3 and LENGTH2 respectively, and for consistency, the
@@ -161,7 +161,6 @@ when choosing to increase the size (see resize()). The only place where
161161 * 4 "levels". Respectively (from the least significant end), level4, the
162162 * address within word, the address within a level3 block, the address within
163163 * a level2 area, and the level1 address of that area within the set.
164- *
165164 * LEVEL4 is the number of bits of the level4 address (number of bits need
166165 * to address the bits in a long)
167166 */
@@ -333,12 +332,12 @@ The test for index i (the first index in all cases) being in range is
333332
334333 /**
335334 * Constructor for a new (sparse) bit set. All bits initially are effectively
336- * <code>false</code>. This is a internal constructor that collects all the
335+ * <code>false</code>. This is an internal constructor that collects all the
337336 * needed actions to initialise the bit set.
338337 * <p>
339338 * The capacity is taken to be a <i>suggestion</i> for a size of the bit set,
340339 * in bits. An appropiate table size (a power of two) is then determined and
341- * used. The size will be grown as needed to accomodate any bits addressed
340+ * used. The size will be grown as needed to accommodate any bits addressed
342341 * during the use of the bit set.
343342 *
344343 * @param capacity a size in terms of bits
@@ -1225,7 +1224,7 @@ public void or(SparseBitSet b)
12251224 * Performs a logical <b>OR</b> of the two given <code>SparseBitSet</code>s.
12261225 * The returned <code>SparseBitSet</code> is created so that a bit in it has
12271226 * the value <code>true</code> if and only if it either had the value
1228- * <code>true</code> in the set given by the first arguemetn or had the value
1227+ * <code>true</code> in the set given by the first argument or had the value
12291228 * <code>true</code> in the second argument, otherwise <code>false</code>.
12301229 *
12311230 * @param a a SparseBitSet
@@ -1354,7 +1353,7 @@ public String statistics()
13541353 * include: Size, Length, Cardinality, Total words (<i>i.e.</i>, the total
13551354 * number of 64-bit "words"), Set array length (<i>i.e.</i>, the number of
13561355 * references that can be held by the top level array, Level2 areas in use,
1357- * Level3 blocks in use,, Level2 pool size, Level3 pool size, and the
1356+ * Level3 blocks in use, Level2 pool size, Level3 pool size, and the
13581357 * Compaction count.
13591358 * <p>
13601359 * This method is intended for diagnostic use (as it is relatively expensive
@@ -1505,7 +1504,7 @@ public String toString()
15051504 /** Sequences of set bits longer than this value are shown by
15061505 * {@link #toString()} as a "sub-sequence," in the form <code>a..b</code>.
15071506 * Setting this value to zero causes each set bit to be listed individually.
1508- * The default default value is 2 (which means sequences of three or more
1507+ * The default value is 2 (which means sequences of three or more
15091508 * bits set are shown as a subsequence, and all other set bits are listed
15101509 * individually).
15111510 * <p>
@@ -1647,8 +1646,8 @@ public static SparseBitSet xor(SparseBitSet a, SparseBitSet b)
16471646 * Throw the exception to indicate a range error. The <code>String</code>
16481647 * constructed reports all the possible errors in one message.
16491648 *
1650- * @param i lower bound for a operation
1651- * @param j upper bound for a operation
1649+ * @param i lower bound for an operation
1650+ * @param j upper bound for an operation
16521651 * @exception IndexOutOfBoundsException indicating the range is not valid
16531652 * @since 1.6
16541653 */
@@ -1668,7 +1667,7 @@ protected static void throwIndexOutOfBoundsException(int i, int j)
16681667 }
16691668
16701669 /**
1671- * Intializes all the additional objects required for correct operation.
1670+ * Initializes all the additional objects required for correct operation.
16721671 *
16731672 * @since 1.6
16741673 */
@@ -1699,7 +1698,7 @@ protected final void nullify(int start)
16991698 }
17001699
17011700 /**
1702- * Resize the bit array. Moves the entries in the the bits array of this
1701+ * Resize the bit array. Moves the entries in the bits array of this
17031702 * SparseBitSet into an array whose size (which may be larger or smaller) is
17041703 * the given bit size (<i>i.e.</i>, includes the bit whose index is one less
17051704 * that the given value). If the new array is smaller, the excess entries in
@@ -1921,7 +1920,7 @@ corresponding lengths (if any). */
19211920 }
19221921 if (isZero ) // The resulting a3 block has no values
19231922 {// nested if!
1924- /* If there is an level 2 area make the entry for this
1923+ /* If there is a level 2 area make the entry for this
19251924 level3 block be a null (i.e., remove any a3 block ). */
19261925 if (haveA2 )
19271926 a2 [u2 ] = null ;
@@ -2183,7 +2182,7 @@ public enum Statistics
21832182 *
21842183 * @see #statisticsUpdate()
21852184 */
2186- protected class Cache
2185+ protected static class Cache
21872186 {
21882187 /**
21892188 * <i>hash</i> is updated by the <i>statisticsUpdate</i>() method.
@@ -2792,7 +2791,7 @@ protected boolean block(int base, int u3, int v3, long[] a3, long[] b3)
27922791
27932792 //-----------------------------------------------------------------------------
27942793 /**
2795- * Set creates entries everywhere within the range. Hence no empty level2
2794+ * Set creates entries everywhere within the range. Hence, no empty level2
27962795 * areas or level3 blocks are ignored, and no empty (all zero) blocks are
27972796 * returned.
27982797 *
@@ -2974,7 +2973,6 @@ protected void finish(int a2Count, int a3Count)
29742973 * in sequential order of the words in the set for which the statistics
29752974 * are being accumulated, and only for non-null values of the second
29762975 * parameter.
2977- *
29782976 * Two of the values (a2Count and a3Count) are not updated here,
29792977 * but are done in the code near where this method is called.
29802978 *
@@ -3053,45 +3051,45 @@ protected boolean block(int base, int u3, int v3, long[] a3, long[] b3)
30533051 /**
30543052 * Word and block <b>and</b> strategy.
30553053 */
3056- protected static final transient AndStrategy andStrategy = new AndStrategy ();
3054+ protected static final AndStrategy andStrategy = new AndStrategy ();
30573055 /**
30583056 * Word and block <b>andNot</b> strategy.
30593057 */
3060- protected static final transient AndNotStrategy andNotStrategy = new AndNotStrategy ();
3058+ protected static final AndNotStrategy andNotStrategy = new AndNotStrategy ();
30613059 /**
30623060 * Word and block <b>clear</b> strategy.
30633061 */
3064- protected static final transient ClearStrategy clearStrategy = new ClearStrategy ();
3062+ protected static final ClearStrategy clearStrategy = new ClearStrategy ();
30653063 /**
30663064 * Word and block <b>copy</b> strategy.
30673065 */
3068- protected static final transient CopyStrategy copyStrategy = new CopyStrategy ();
3066+ protected static final CopyStrategy copyStrategy = new CopyStrategy ();
30693067 /**
30703068 * Word and block <b>equals</b> strategy.
30713069 */
30723070 protected transient EqualsStrategy equalsStrategy ;
30733071 /**
30743072 * Word and block <b>flip</b> strategy.
30753073 */
3076- protected static final transient FlipStrategy flipStrategy = new FlipStrategy ();
3074+ protected static final FlipStrategy flipStrategy = new FlipStrategy ();
30773075 /**
30783076 * Word and block <b>intersects</b> strategy.
30793077 */
3080- protected static transient IntersectsStrategy intersectsStrategy = new IntersectsStrategy ();
3078+ protected static final IntersectsStrategy intersectsStrategy = new IntersectsStrategy ();
30813079 /**
30823080 * Word and block <b>or</b> strategy.
30833081 */
3084- protected static final transient OrStrategy orStrategy = new OrStrategy ();
3082+ protected static final OrStrategy orStrategy = new OrStrategy ();
30853083 /**
30863084 * Word and block <b>set</b> strategy.
30873085 */
3088- protected static final transient SetStrategy setStrategy = new SetStrategy ();
3086+ protected static final SetStrategy setStrategy = new SetStrategy ();
30893087 /**
30903088 * Word and block <b>update</b> strategy.
30913089 */
30923090 protected transient UpdateStrategy updateStrategy ;
30933091 /**
30943092 * Word and block <b>xor</b> strategy.
30953093 */
3096- protected static final transient XorStrategy xorStrategy = new XorStrategy ();
3094+ protected static final XorStrategy xorStrategy = new XorStrategy ();
30973095}
0 commit comments