Class SiteUUID

    • Field Detail

      • site

        protected java.lang.String site
      • name

        protected java.lang.String name
    • Constructor Detail

      • SiteUUID

        public SiteUUID()
      • SiteUUID

        public SiteUUID​(long mostSigBits,
                        long leastSigBits,
                        java.lang.String name,
                        java.lang.String site)
      • SiteUUID

        public SiteUUID​(UUID uuid,
                        java.lang.String name,
                        java.lang.String site)
    • Method Detail

      • getName

        public java.lang.String getName()
      • getSite

        public java.lang.String getSite()
        Description copied from interface: SiteAddress
        Returns the ID of the site (all sites need to have a unique site ID)
        Specified by:
        getSite in interface SiteAddress
      • hashCode

        public int hashCode()
        Description copied from class: UUID
        Returns a hash code for this UUID.
        Overrides:
        hashCode in class UUID
        Returns:
        A hash code value for this UUID
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from class: UUID
        Compares this object to the specified object. The result is true if and only if the argument is not null, is a UUID object, has the same variant, and contains the same value, bit for bit, as this UUID.
        Overrides:
        equals in class UUID
        Parameters:
        obj - The object to be compared
        Returns:
        true if the objects are the same; false otherwise
      • compareTo

        public int compareTo​(Address other)
        Description copied from class: UUID
        Compares this UUID with the specified UUID.

        The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is greater for the first UUID.

        Specified by:
        compareTo in interface java.lang.Comparable<Address>
        Overrides:
        compareTo in class UUID
        Parameters:
        other - UUID to which this UUID is to be compared
        Returns:
        -1, 0 or 1 as this UUID is less than, equal to, or greater than val
      • isSiteAddress

        public boolean isSiteAddress()
        Description copied from interface: Address
        Whether or not this address is a SiteAddress. Kludgey workaround to avoid the use of instanceof SiteAddress.
        Will be removed once the type pollution issue (https://bugs.openjdk.org/browse/JDK-8180450) is fixed.
        Specified by:
        isSiteAddress in interface Address
        Returns:
        True if this address is a site address, otherwise false
      • print

        public java.lang.String print​(boolean detailed)
      • writeTo

        public void writeTo​(java.io.DataOutput out)
                     throws java.io.IOException
        Description copied from interface: Streamable
        Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed
        Specified by:
        writeTo in interface Streamable
        Overrides:
        writeTo in class ExtendedUUID
        Throws:
        java.io.IOException
      • readFrom

        public void readFrom​(java.io.DataInput in)
                      throws java.io.IOException
        Description copied from interface: Streamable
        Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
        Specified by:
        readFrom in interface Streamable
        Overrides:
        readFrom in class ExtendedUUID
        Throws:
        java.io.IOException
      • printOthers

        protected java.lang.String printOthers()