|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.ordermanager.NumberPacker
public final class NumberPacker
Provides methods to encode a non-negative number into (or decode from) an ASCII string based on the specified conversion table. This class cannot be inherited.
| Field Summary | |
|---|---|
static NumberPacker |
DEFAULT
A default instance of NumberPacker that uses DefaultTable. |
static String |
DefaultTable
|
| Constructor Summary | |
|---|---|
NumberPacker(String table)
Instantiates a new number packer. |
|
| Method Summary | |
|---|---|
String |
getTable()
Gets the table. |
String |
pack(int number)
Packs the number into a shorter string. |
int |
unpack(String s)
Unpacks the number from a string encoded using pack(int) method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DefaultTable
public static final NumberPacker DEFAULT
| Constructor Detail |
|---|
public NumberPacker(String table)
table - the table| Method Detail |
|---|
public String pack(int number)
number - the number (must be non-negative)
public int unpack(String s)
pack(int) method.
s - the input string
public String getTable()
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||