Interface UuidMapper
- All Known Subinterfaces:
DeterministicUuidMapper
,MemoizedUuidMapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This interface allows for mapping objects'
UUID
s, for example when cloning objects.
Separate interface is needed to emphasize that it works with UUID formatted strings- Author:
- krylov
-
Method Summary
Modifier and TypeMethodDescriptionGenerates a new UUID string for given source UUIDstatic UuidMapper
random()
-
Method Details
-
random
- Returns:
- mapper that returns a random UUID every time
-
map
Generates a new UUID string for given source UUID- Parameters:
oldId
- old UUID- Returns:
- new UUID
-