Class ResourceConsumerId


  • public class ResourceConsumerId
    extends Object
    Representation of global unique ID for ResourceConsumer object.
    • Constructor Detail

      • ResourceConsumerId

        protected ResourceConsumerId()
    • Method Detail

      • isClassOf

        public boolean isClassOf​(Class<?> cls)
        Checks if the consumer is an instance of given class.
        Parameters:
        cls - class object
        Returns:
        result of check
      • consumerClass

        public String consumerClass()
        Returns class name of the consumer.
        Returns:
        class name of the consumer in String
      • value

        public long value()
        Returns ID value.
        Returns:
        ID value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • of

        public static <T extends ResourceConsumerResourceConsumerId of​(long value,
                                                                         Class<T> cls)
        Creates ResourceConsumerId from given value and class.
        Type Parameters:
        T - resource consumer class type
        Parameters:
        value - ID value unique within the given class
        cls - class of ResourceConsumer implementation
        Returns:
        created ResourceConsumerId object
      • of

        public static <T extends Identifier<Long> & ResourceConsumerResourceConsumerId of​(T id)
        Creates ResourceConsumerId instance from Identifier object.
        Type Parameters:
        T - resource consumer class type
        Parameters:
        id - identifier object backed by Long value
        Returns:
        created ResourceConsumerId object