Javadoc formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1388152 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e97754ebfb
commit
23e3b0f0fc
|
@ -23,8 +23,8 @@ import java.util.Comparator;
|
||||||
* Defines the interface to analyze {@link Trie} keys on a bit level.
|
* Defines the interface to analyze {@link Trie} keys on a bit level.
|
||||||
* {@link KeyAnalyzer}'s methods return the length of the key in bits,
|
* {@link KeyAnalyzer}'s methods return the length of the key in bits,
|
||||||
* whether or not a bit is set, and bits per element in the key.
|
* whether or not a bit is set, and bits per element in the key.
|
||||||
*
|
* <p>
|
||||||
* <p>Additionally, a method determines if a key is a prefix of another
|
* Additionally, a method determines if a key is a prefix of another
|
||||||
* key and returns the bit index where one key is different from another
|
* key and returns the bit index where one key is different from another
|
||||||
* key (if the key and found key are equal than the return value is
|
* key (if the key and found key are equal than the return value is
|
||||||
* {@link #EQUAL_BIT_KEY}).
|
* {@link #EQUAL_BIT_KEY}).
|
||||||
|
@ -52,31 +52,34 @@ public interface KeyAnalyzer<K> extends Comparator<K>, Serializable {
|
||||||
/**
|
/**
|
||||||
* Returns the number of bits per element in the key.
|
* Returns the number of bits per element in the key.
|
||||||
* This is only useful for variable-length keys, such as Strings.
|
* This is only useful for variable-length keys, such as Strings.
|
||||||
|
*
|
||||||
|
* @return the number of bits per element
|
||||||
*/
|
*/
|
||||||
public int bitsPerElement();
|
public int bitsPerElement();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the length of the Key in bits.
|
* Returns the length of the Key in bits.
|
||||||
|
*
|
||||||
|
* @param key the key
|
||||||
|
* @return the bit length of the key
|
||||||
*/
|
*/
|
||||||
public int lengthInBits(K key);
|
public int lengthInBits(K key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not a bit is set
|
* Returns whether or not a bit is set.
|
||||||
*/
|
*/
|
||||||
public boolean isBitSet(K key, int bitIndex, int lengthInBits);
|
public boolean isBitSet(K key, int bitIndex, int lengthInBits);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the n-th different bit between key and found.
|
* Returns the n-th different bit between key and found. This starts the comparison in
|
||||||
* This starts the comparison in key at 'keyStart' and goes
|
* key at 'keyStart' and goes for 'keyLength' bits, and compares to the found key starting
|
||||||
* for 'keyLength' bits, and compares to the found key
|
* at 'foundStart' and going for 'foundLength' bits.
|
||||||
* starting at 'foundStart' and going for 'foundLength' bits.
|
|
||||||
*/
|
*/
|
||||||
public int bitIndex(K key, int offsetInBits, int lengthInBits,
|
public int bitIndex(K key, int offsetInBits, int lengthInBits,
|
||||||
K other, int otherOffsetInBits, int otherLengthInBits);
|
K other, int otherOffsetInBits, int otherLengthInBits);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether or not the given prefix (from offset to length)
|
* Determines whether or not the given prefix (from offset to length) is a prefix of the given key.
|
||||||
* is a prefix of the given key.
|
|
||||||
*/
|
*/
|
||||||
public boolean isPrefix(K prefix, int offsetInBits, int lengthInBits, K key);
|
public boolean isPrefix(K prefix, int offsetInBits, int lengthInBits, K key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,8 +201,7 @@ abstract class PatriciaTrieBase<K, V> extends AbstractTrie<K, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IndexOutOfBoundsException("Failed to put: "
|
throw new IndexOutOfBoundsException("Failed to put: " + key + " -> " + value + ", " + bitIndex);
|
||||||
+ key + " -> " + value + ", " + bitIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue