Package me.ahoo.cosid.converter
Class RadixIdConverter
java.lang.Object
me.ahoo.cosid.converter.RadixIdConverter
- All Implemented Interfaces:
IdConverter
,Statistical
- Direct Known Subclasses:
Radix36IdConverter
,Radix62IdConverter
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
PAD_CHAR
public static final char PAD_CHAR- See Also:
-
-
Constructor Details
-
RadixIdConverter
protected RadixIdConverter(boolean padStart, int charSize)
-
-
Method Details
-
offset
public static int offset(char digitChar) -
maxCharSize
public static int maxCharSize(int radix, int bits) -
getCharSize
public int getCharSize() -
getMaxId
public long getMaxId() -
asString
Description copied from interface:IdConverter
convertlong
type ID toString
.- Specified by:
asString
in interfaceIdConverter
- Parameters:
id
-long
type ID- Returns:
String
type ID
-
asLong
Description copied from interface:IdConverter
convertString
type ID tolong
.- Specified by:
asLong
in interfaceIdConverter
- Parameters:
idString
-String
type ID- Returns:
long
type ID
-
stat
- Specified by:
stat
in interfaceIdConverter
- Specified by:
stat
in interfaceStatistical
-