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.
The class is only intended for use by PathFilterGroup.
The arrays stored may not be changed after adding.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ByteArraySet.
An incremental hash function. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private ByteArraySet. | |
| private int | |
| private int | |
| private byte[][] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv byte[] | Returns: newValue if stored, or the prior value already stored and
that would have been returned had the caller used
get(newValue) first.the array to store by reference if the length is the same as
the length parameter newValue, int The number of bytes in newValue that are used length, int pre-computed hash of toFind hash)Store a byte array for future lookup. |
| private int | |
| pack-priv boolean | Returns: true if the mapping exists for this byte array; false otherwise.array to find. toFind, int The number of bytes in toFind that are used length, int pre-computed hash of toFind hash)Returns true if this set contains the specified array. |
| private static byte[] | |
| private static boolean | |
| private byte[] | |
| private void | |
| private void | |
| private void | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv byte[][] | |
| pack-priv Set | |
| public String |
| grow | back to summary |
|---|---|
| private int grow | |
| hasher | back to summary |
|---|---|
| private ByteArraySet. | |
| mask | back to summary |
|---|---|
| private int mask | |
| size | back to summary |
|---|---|
| private int size | |
| table | back to summary |
|---|---|
| private byte[][] table | |
| ByteArraySet | back to summary |
|---|---|
| pack-priv ByteArraySet(int capacity) Create an empty set.
| |
| addIfAbsent | back to summary |
|---|---|
| pack-priv byte[] addIfAbsent(final byte[] newValue, int length, int hash) Store a byte array for future lookup.
Stores byte[] obj = ...; boolean wasNew = map.addIfAbsent(array, length, hash) == array;
| |
| chainlength | back to summary |
|---|---|
| private int chainlength(byte[] b) | |
| contains | back to summary |
|---|---|
| pack-priv boolean contains(byte[] toFind, int length, int hash) Returns true if this set contains the specified array.
| |
| copyIfNotSameSize | back to summary |
|---|---|
| private static byte[] copyIfNotSameSize(byte[] newValue, int length) | |
| equals | back to summary |
|---|---|
| private static boolean equals(byte[] storedObj, byte[] toFind, int length) | |
| get | back to summary |
|---|---|
| private byte[] get(byte[] toFind, int length, int hash) | |
| grow | back to summary |
|---|---|
| private void grow() | |
| initTable | back to summary |
|---|---|
| private void initTable(int sz) | |
| insert | back to summary |
|---|---|
| private void insert(byte[] newValue, int hash) | |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() Returns true if
| |
| size | back to summary |
|---|---|
| pack-priv int size() Returns number of arrays in the set
| |
| toArray | back to summary |
|---|---|
| pack-priv byte[][] toArray() | |
| toSet | back to summary |
|---|---|
| pack-priv Set | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv void | |
| public int | |
| pack-priv int | |
| public String |
| data | back to summary |
|---|---|
| private byte[] data | |
| hash | back to summary |
|---|---|
| private int hash | |
| length | back to summary |
|---|---|
| private int length | |
| pos | back to summary |
|---|---|
| private int pos | |
| Hasher | back to summary |
|---|---|
| pack-priv Hasher(byte[] data, int length) | |
| getHash | back to summary |
|---|---|
| pack-priv int getHash() | |
| hash | back to summary |
|---|---|
| pack-priv int hash() | |
| hasNext | back to summary |
|---|---|
| pack-priv boolean hasNext() | |
| init | back to summary |
|---|---|
| pack-priv void init(byte[] d, int l) | |
| length | back to summary |
|---|---|
| public int length() | |
| nextHash | back to summary |
|---|---|
| pack-priv int nextHash() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |