Module com.github.f4b6a3.uuid
Class BaseNRemainderEncoder
- java.lang.Object
-
- com.github.f4b6a3.uuid.codec.base.function.BaseNEncoder
-
- com.github.f4b6a3.uuid.codec.base.function.BaseNRemainderEncoder
-
public final class BaseNRemainderEncoder extends BaseNEncoder
Function that encodes a UUID to a base-n string.It encodes using remainder operator (modulus), a common approach to encode integers.
The encoding process is performed using integer arithmetic.
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseNCodec.CustomDividerdivider-
Fields inherited from class com.github.f4b6a3.uuid.codec.base.function.BaseNEncoder
alphabet, base
-
-
Constructor Summary
Constructors Constructor Description BaseNRemainderEncoder(BaseN base)BaseNRemainderEncoder(BaseN base, BaseNCodec.CustomDivider divider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(UUID uuid)protected static long[]divide(long x, BaseNCodec.CustomDivider divider, long rem)
-
-
-
Field Detail
-
divider
protected final BaseNCodec.CustomDivider divider
-
-
Constructor Detail
-
BaseNRemainderEncoder
public BaseNRemainderEncoder(BaseN base)
-
BaseNRemainderEncoder
public BaseNRemainderEncoder(BaseN base, BaseNCodec.CustomDivider divider)
-
-
Method Detail
-
divide
protected static long[] divide(long x, BaseNCodec.CustomDivider divider, long rem)
-
-