286 |
return 0; // not reached. |
return 0; // not reached. |
287 |
} |
} |
288 |
|
|
289 |
|
public int hashCode() |
290 |
|
{ |
291 |
|
int result = 0; |
292 |
|
for (int i = 0; i < bytes.length - 1; ++i) |
293 |
|
result = result * 31 + bytes[i]; |
294 |
|
if (bytes.length > 0) |
295 |
|
{ |
296 |
|
int lastByte = bytes[bytes.length - 1] & ~ ((1 << ignoredBits) - 1); |
297 |
|
result = result * 31 + lastByte; |
298 |
|
} |
299 |
|
return result; |
300 |
|
} |
301 |
|
|
302 |
public boolean equals(Object o) |
public boolean equals(Object o) |
303 |
{ |
{ |
304 |
if (!(o instanceof BitString)) |
if (!(o instanceof BitString)) |