I'd like a simple way of generating a type safe type based on String.
I have a bunch of places where I usually use just a String to hold opaque UID (example) and I'd like to move away from this.
java.lang.String is final. Ideally I would have liked to extend String but I understand I can't be doing that. What are my best options?
I know I can use an encapsulation but I am looking for something a bit more efficient, if at all possible.
Update: I want a meaningful name for the type i.e. not just UUID everywhere.