Class ResourceGroup

  • All Implemented Interfaces:
    ResourceConsumer

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

    This class is immutable.

    • 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​(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 String toString()
        Overrides:
        toString in class org.onlab.util.Identifier<Long>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class org.onlab.util.Identifier<Long>
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class org.onlab.util.Identifier<Long>