|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Digitizer<T>
The Digitizer
interface
provides a mechanism for any
algorithm or data structure
to treat each element in a collection as a sequence of digits where each digit is mapped
to an integer from 0 to b-1 where b is the base of the digit.
Method Summary | |
---|---|
String |
formatDigit(T x,
int place)
|
int |
getBase()
Returns the base. |
int |
getDigit(T x,
int place)
Returns the value of digit place
for element x. |
boolean |
isPrefixFree()
Returns true if and only if the digitizer guarantees that no element is a prefix of another. |
int |
numDigits(T x)
Returns the number of digits in the element x. |
Method Detail |
---|
int getBase()
boolean isPrefixFree()
int numDigits(T x)
int getDigit(T x, int place)
place
for element x.
String formatDigit(T x, int place)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |