Class DefaultTopologyCluster

  • All Implemented Interfaces:
    TopologyCluster

    public class DefaultTopologyCluster
    extends java.lang.Object
    implements TopologyCluster
    Default implementation of a network topology cluster.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultTopologyCluster​(ClusterId id, int deviceCount, int linkCount, TopologyVertex root)
      Creates a new topology cluster descriptor with the specified attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int deviceCount()
      Returns the number of devices in the cluster.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      ClusterId id()
      Returns the cluster id.
      int linkCount()
      Returns the number of infrastructure links in the cluster.
      TopologyVertex root()
      Returns the cluster root vertex.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DefaultTopologyCluster

        public DefaultTopologyCluster​(ClusterId id,
                                      int deviceCount,
                                      int linkCount,
                                      TopologyVertex root)
        Creates a new topology cluster descriptor with the specified attributes.
        Parameters:
        id - cluster id
        deviceCount - number of devices in the cluster
        linkCount - number of links in the cluster
        root - cluster root node
    • Method Detail

      • deviceCount

        public int deviceCount()
        Description copied from interface: TopologyCluster
        Returns the number of devices in the cluster.
        Specified by:
        deviceCount in interface TopologyCluster
        Returns:
        number of cluster devices
      • linkCount

        public int linkCount()
        Description copied from interface: TopologyCluster
        Returns the number of infrastructure links in the cluster.
        Specified by:
        linkCount in interface TopologyCluster
        Returns:
        number of cluster links
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object