|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.util.LongEncoder
public class LongEncoder
Encodes long values into the specified alphabet. Encoding is useful when long values need to be
represented in their string form and shorter values are preferred; by using alphabets of length
greater than ten shorter values can be obtained. For example, to encode values into their
hexadecimal representations the 0123456789ABCDEF-
can be used. Long values can be
shortened even further by using longer alphabets. The last character in the alphabet is used as
the negative sign.
Field Summary | |
---|---|
static String |
DEFAULT
default alphabet that should be safe to use in most circumstances, while still providing good shortening of long values |
Method Summary | |
---|---|
static long |
decode(String value)
Decodes value using the default alphabet: |
static long |
decode(String value,
String alphabet)
Decodes value using the specified alphabet |
static String |
encode(long value)
Encodes the value into the default alphabet: |
static String |
encode(long value,
String alphabet)
Encodes value into the specified alphabet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String DEFAULT
Method Detail |
---|
public static String encode(long value)
value
-
public static long decode(String value)
value
-
public static String encode(long value, String alphabet)
value
- alphabet
-
public static long decode(String value, String alphabet)
value
- alphabet
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |