Class ResourceConsumerId


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

      Constructors 
      Modifier Constructor Description
      protected ResourceConsumerId()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String consumerClass()
      Returns class name of the consumer.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isClassOf​(java.lang.Class<?> cls)
      Checks if the consumer is an instance of given class.
      static <T extends ResourceConsumer>
      ResourceConsumerId
      of​(long value, java.lang.Class<T> cls)
      Creates ResourceConsumerId from given value and class.
      static <T extends org.onlab.util.Identifier<java.lang.Long> & ResourceConsumer>
      ResourceConsumerId
      of​(T id)
      Creates ResourceConsumerId instance from Identifier object.
      long value()
      Returns ID value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • 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 org.onlab.util.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