|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldman.collection.IndexedNumber.NumberDigitizer
public static class IndexedNumber.NumberDigitizer
This class provides a sample implementation for the Digitizer
interface for base 10 numbers that uses standard place value to report the value
for each digit.
Constructor Summary | |
---|---|
IndexedNumber.NumberDigitizer()
|
Method Summary | |
---|---|
String |
formatDigit(IndexedNumber x,
int place)
|
int |
getBase()
Returns the base. |
int |
getDigit(IndexedNumber 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(IndexedNumber x)
Returns the number of digits in the element x. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexedNumber.NumberDigitizer()
Method Detail |
---|
public int getBase()
Digitizer
getBase
in interface Digitizer<IndexedNumber>
public int numDigits(IndexedNumber x)
Digitizer
numDigits
in interface Digitizer<IndexedNumber>
public boolean isPrefixFree()
Digitizer
isPrefixFree
in interface Digitizer<IndexedNumber>
public int getDigit(IndexedNumber x, int place)
Digitizer
place
for element x.
getDigit
in interface Digitizer<IndexedNumber>
public String formatDigit(IndexedNumber x, int place)
formatDigit
in interface Digitizer<IndexedNumber>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |