Class Topology


  • public class Topology
    extends Object
    Wrapper representing full network topology.
    • Constructor Detail

      • Topology

        public Topology​(List<Router> routers,
                        ArrayList<TopologyNetwork> networks)
        Instantiates a new Topology.
        Parameters:
        routers - the routers
        networks - the network top
      • Topology

        public Topology​(ArrayList<TopologyNetwork> networks)
        Instantiates a new Topology.
        Parameters:
        networks - the network top
      • Topology

        public Topology​(Integer networkCount)
        Instantiates a new Topology.
        Parameters:
        networkCount - the network count
    • Method Detail

      • getDevices

        public Set<Device> getDevices()
      • setDevices

        public void setDevices​(Set<Device> devices)
      • addDevice

        public void addDevice​(Device d)
      • getRouters

        public List<Router> getRouters()
        Gets routers.
        Returns:
        the routers
      • setRouters

        public void setRouters​(List<Router> routers)
        Sets routers.
        Parameters:
        routers - the routers
      • setNetworks

        public void setNetworks​(ArrayList<TopologyNetwork> networks)
        Sets network top.
        Parameters:
        networks - the network top
      • findRouterByName

        public Router findRouterByName​(String name)
        Finds router in list by name.
        Parameters:
        name - name of router
        Returns:
        router object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object