Package at.favre.lib.idmask
Class IdMasks
- java.lang.Object
-
- at.favre.lib.idmask.IdMasks
-
public final class IdMasks extends Object
Factory and main API of the library. Use to create new IdMask instances for various types.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IdMask<byte[]>
for128bitNumbers(Config config)
Create new id mask for 128 bit ids represented as byte array.static IdMask<BigInteger>
forBigInteger(Config config)
Create new id mask for 128 bit ids represented as byte array.static IdMask<Long>
forLongIds(Config config)
Create new id mask for masking 64 bit integers.static IdMask<LongTuple>
forLongTuples(Config config)
Create new id mask for masking a tuple of 2 x 64 bit integers.static IdMask<UUID>
forUuids(Config config)
Create new id mask for masking a UUIDs.
-
-
-
Method Detail
-
forLongIds
public static IdMask<Long> forLongIds(Config config)
Create new id mask for masking 64 bit integers.- Parameters:
config
- to adjust settings- Returns:
- new instance
-
forLongTuples
public static IdMask<LongTuple> forLongTuples(Config config)
Create new id mask for masking a tuple of 2 x 64 bit integers.- Parameters:
config
- to adjust settings- Returns:
- new instance
-
forUuids
public static IdMask<UUID> forUuids(Config config)
Create new id mask for masking a UUIDs.(see
UUID.fromString(String)
for converting from string representation.- Parameters:
config
- to adjust settings- Returns:
- new instance
-
for128bitNumbers
public static IdMask<byte[]> for128bitNumbers(Config config)
Create new id mask for 128 bit ids represented as byte array.- Parameters:
config
- to adjust settings- Returns:
- new instance
-
forBigInteger
public static IdMask<BigInteger> forBigInteger(Config config)
Create new id mask for 128 bit ids represented as byte array.- Parameters:
config
- to adjust settings- Returns:
- new instance
-
-