Class UniqueId.Segment

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    UniqueId

    @API(status=STABLE,
         since="1.0")
    public static class UniqueId.Segment
    extends java.lang.Object
    implements java.io.Serializable
    A segment of a UniqueId comprises a type and a value.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      private java.lang.String type  
      private java.lang.String value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Segment​(java.lang.String type, java.lang.String value)
      Create a new Segment using the supplied type and value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getType()
      Get the type of this segment.
      java.lang.String getValue()
      Get the value of this segment.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • type

        private final java.lang.String type
      • value

        private final java.lang.String value
    • Constructor Detail

      • Segment

        Segment​(java.lang.String type,
                java.lang.String value)
        Create a new Segment using the supplied type and value.
        Parameters:
        type - the type of this segment
        value - the value of this segment
    • Method Detail

      • getType

        public java.lang.String getType()
        Get the type of this segment.
      • getValue

        public java.lang.String getValue()
        Get the value of this segment.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object