Improve the documentation of the ByteArraySet used by PathFilterGroup
Change-Id: I2ba7a67e8e1596aa6c33a9caddee03a6be48f008
This commit is contained in:
parent
95ef1e83d0
commit
78606404de
|
@ -53,6 +53,10 @@
|
|||
* {@link PathFilterGroup.Group}. Most methods assume the hash is already know
|
||||
* and therefore requires the caller to supply it beforehand. The implementation
|
||||
* is a loose derivative of ObjectIdSubclassMap.
|
||||
* <p>
|
||||
* The class is only intended for use by PathFilterGroup.
|
||||
* <p>
|
||||
* The arrays stored may not be changed after adding.
|
||||
*/
|
||||
class ByteArraySet {
|
||||
|
||||
|
@ -87,11 +91,11 @@ private byte[] get(final byte[] toFind, int length, int hash) {
|
|||
return null;
|
||||
}
|
||||
|
||||
private static boolean equals(byte[] a, byte[] b, int length) {
|
||||
if (a.length != length || b.length < length)
|
||||
private static boolean equals(byte[] storedObj, byte[] toFind, int length) {
|
||||
if (storedObj.length != length || toFind.length < length)
|
||||
return false;
|
||||
for (int i = 0; i < length; ++i) {
|
||||
if (a[i] != b[i])
|
||||
if (storedObj[i] != toFind[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -125,7 +129,8 @@ boolean contains(final byte[] toFind, int length, int hash) {
|
|||
* </pre>
|
||||
*
|
||||
* @param newValue
|
||||
* the array to store.
|
||||
* the array to store by reference if the length is the same as
|
||||
* the length parameter
|
||||
* @param length
|
||||
* The number of bytes in newValue that are used
|
||||
* @param hash
|
||||
|
@ -246,6 +251,9 @@ private int chainlength(byte[] b) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* An incremental hash function.
|
||||
*/
|
||||
static class Hasher {
|
||||
private int hash;
|
||||
|
||||
|
|
Loading…
Reference in New Issue