Class ResourceConsumerId


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

      • ResourceConsumerId

        protected ResourceConsumerId()
    • Method Detail

      • isClassOf

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

        public java.lang.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
      • equals

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

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

        public static <T extends ResourceConsumerResourceConsumerId of​(long value,
                                                                         java.lang.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<java.lang.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