Class ResourceGroup

  • All Implemented Interfaces:
    ResourceConsumer

    @Beta
    public final class ResourceGroup
    extends Identifier<java.lang.Long>
    implements ResourceConsumer
    Intent identifier suitable as an external key.

    This class is immutable.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ResourceGroup()
      Constructor for serializer.
      protected ResourceGroup​(long value)
      Constructs the ID corresponding to a given long value.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ResourceConsumerId consumerId()
      Returns ID of this consumer.
      boolean equals​(java.lang.Object obj)
      Compares two device key identifiers for equality.
      long fingerprint()
      Returns the backing value.
      int hashCode()
      Returns the hashcode of the identifier.
      static ResourceGroup of​(long value)
      Creates a resource group identifier from the specified long representation.
      static ResourceGroup of​(java.lang.String value)
      Creates a resource group identifier from the specified string representation.
      java.lang.String toString()
      Returns a string representation of a DeviceKeyId.
      • Methods inherited from class java.lang.Object

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

      • ResourceGroup

        protected ResourceGroup()
        Constructor for serializer.
      • ResourceGroup

        protected ResourceGroup​(long value)
        Constructs the ID corresponding to a given long value.
        Parameters:
        value - the underlying value of this ID
    • Method Detail

      • of

        public static ResourceGroup of​(long value)
        Creates a resource group identifier from the specified long representation.
        Parameters:
        value - long value
        Returns:
        resource group identifier
      • of

        public static ResourceGroup of​(java.lang.String value)
        Creates a resource group identifier from the specified string representation. Warning: it is caller responsibility to make sure the hashed value of value is unique.
        Parameters:
        value - string value
        Returns:
        resource group identifier
      • fingerprint

        public long fingerprint()
        Returns the backing value.
        Returns:
        the value
      • toString

        public java.lang.String toString()
        Description copied from class: Identifier
        Returns a string representation of a DeviceKeyId.
        Overrides:
        toString in class Identifier<java.lang.Long>
        Returns:
        string
      • hashCode

        public int hashCode()
        Description copied from class: Identifier
        Returns the hashcode of the identifier.
        Overrides:
        hashCode in class Identifier<java.lang.Long>
        Returns:
        hashcode
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from class: Identifier
        Compares two device key identifiers for equality.
        Overrides:
        equals in class Identifier<java.lang.Long>
        Parameters:
        obj - to compare against
        Returns:
        true if the objects are equal, false otherwise.