Class NamedId

  • All Implemented Interfaces:
    java.io.Serializable

    public class NamedId
    extends java.lang.Object
    implements java.io.Serializable
    A NamedId is an identifier which is primarily a UUID, but can have a "friendly" name associated with it. It can be created with either, and then will "match" on either when compared. The idea is that references are held based on UUID, but if such an id is no longer present, a friendly name is more helpful to indicate to the user which reference was intended.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedId​(java.util.UUID id, java.lang.String name)  
    • Constructor Detail

      • NamedId

        public NamedId​(java.util.UUID id,
                       java.lang.String name)
    • Method Detail

      • fromUuid

        public static NamedId fromUuid​(java.util.UUID id)
      • fromName

        public static NamedId fromName​(java.lang.String name)
      • from

        public static NamedId from​(java.util.UUID id,
                                   java.lang.String name)
      • setName

        public void setName​(java.lang.String name)
      • getName

        public java.lang.String getName()
      • getId

        public java.util.UUID getId()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • strictEquals

        public boolean strictEquals​(java.lang.Object obj)