Class Id

java.lang.Object
it.tidalwave.util.Id
All Implemented Interfaces:
StringValue, Serializable, Comparable<Id>

@Immutable public class Id extends Object implements Serializable, Comparable<Id>, StringValue
An opaque wrapper for identifiers.
Author:
Fabrizio Giudici
See Also:
Status: stable API
  • Constructor Details

    • Id

      public Id()
  • Method Details

    • of

      @Nonnull public static Id of(@Nonnull Object value)
      Parameters:
      value - the id value
      Returns:
      the new instance
      Since:
      3.2-ALPHA-2
    • ofUuid

      @Nonnull public static Id ofUuid()
      Returns:
      the new instance
      Since:
      3.2-ALPHA-9
    • stringValue

      @Nonnull public String stringValue()
      Returns the String value of this object.
      Specified by:
      stringValue in interface StringValue
      Returns:
      the string
    • compareTo

      public int compareTo(Id other)
      Specified by:
      compareTo in interface Comparable<Id>
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object