|
22 | 22 | * Class that models an array of {@code Booleans} with the {@link java.util.List} interface. |
23 | 23 | * |
24 | 24 | * <p> |
25 | | - * The aim of this class is to enhance the performance of common operations such as {@code add}, {@code remove} and |
26 | | - * {@code set} while also minimizing its memory footprint. This class was made explicitly to replace {@link ArrayList} |
27 | | - * when working with {@code Boolean} elements. |
| 25 | + * This class was made explicitly to replace {@link java.util.ArrayList} when working with {@code Boolean} elements. |
| 26 | + * It aims to enhance the performance of common operations such as {@code add}, {@code remove} and {@code set} while |
| 27 | + * also minimizing its memory footprint. |
28 | 28 | * </p> |
29 | 29 | * |
30 | 30 | * <p> |
|
50 | 50 | * not follow the one bit per entry principle. |
51 | 51 | * </p> |
52 | 52 | * |
53 | | - * @author George Bouroutzoglou (geompokon@csd.auth.gr) |
54 | 53 | * @version 1.0.0 |
55 | 54 | * @see java.util.List |
56 | 55 | * @see java.util.AbstractList |
@@ -79,7 +78,7 @@ public final class BitArray extends AbstractList<Boolean> implements RandomAcces |
79 | 78 | private int elements; |
80 | 79 |
|
81 | 80 | /** |
82 | | - * Default constructor. Sets initial capacity to {@link #DEFAULT_CAPACITY}. |
| 81 | + * Default constructor. Sets initial capacity to 64 |
83 | 82 | */ |
84 | 83 | public BitArray() { |
85 | 84 | this(DEFAULT_CAPACITY); |
@@ -109,7 +108,7 @@ public BitArray(int initialCapacity) { |
109 | 108 | * </p> |
110 | 109 | * |
111 | 110 | * @param other the collection supplying the elements |
112 | | - * @throws NullPointerException if the collection is null |
| 111 | + * @throws java.lang.NullPointerException if the collection is null |
113 | 112 | */ |
114 | 113 | public BitArray(Collection<? extends Boolean> other) { |
115 | 114 | Objects.requireNonNull(other); |
@@ -147,7 +146,7 @@ private void initMembers(int initialCapacity) { |
147 | 146 | * |
148 | 147 | * @param index array index to insert the element in |
149 | 148 | * @param bit the boolean value to be inserted |
150 | | - * @throws IndexOutOfBoundsException if index is out of array insertion bounds |
| 149 | + * @throws java.lang.IndexOutOfBoundsException if index is out of array insertion bounds |
151 | 150 | */ |
152 | 151 | public void add(int index, Boolean bit) { |
153 | 152 | Objects.requireNonNull(bit); |
@@ -194,7 +193,7 @@ public Boolean get(int index) { |
194 | 193 | * @param index index of the array element to be changed |
195 | 194 | * @param bit the new value of the array element |
196 | 195 | * @return boolean value of the previous bit at that index |
197 | | - * @throws IndexOutOfBoundsException if index is out of array bounds |
| 196 | + * @throws java.lang.IndexOutOfBoundsException if index is out of array bounds |
198 | 197 | */ |
199 | 198 | public Boolean set(int index, Boolean bit) { |
200 | 199 | Objects.requireNonNull(bit); |
@@ -516,9 +515,9 @@ public BitArray clone() { |
516 | 515 | * |
517 | 516 | * <p> |
518 | 517 | * The string consists of the number of elements in the array and a list of the elements in a human readable |
519 | | - * format. Exact representation is "Size = SIZE, [((0 | 1) + ' ')*]" where SIZE is a non negative integer and |
520 | | - * the list of elements consists of opening square brackets ([), zero or more bits (single digit ones or zeros) |
521 | | - * separated by spaces and closing square brackets. |
| 518 | + * format. Exact representation is "Size = SIZE, [(((0 | 1) + ' ')* (0 | 1))?]" where SIZE is a non negative integer |
| 519 | + * and '+' is the concatenation operator. The list of elements consists of opening square brackets ([), zero or more |
| 520 | + * bits (single digit ones or zeros) separated by spaces and closing square brackets. |
522 | 521 | * </p> |
523 | 522 | * <p> |
524 | 523 | * Examples:<br> |
|
0 commit comments