Class Topology
- java.lang.Object
-
- io.patriot_framework.network.simulator.api.model.Topology
-
public class Topology extends Object
Wrapper representing full network topology.
-
-
Constructor Summary
Constructors Constructor Description Topology(Integer networkCount)
Instantiates a new Topology.Topology(ArrayList<TopologyNetwork> networks)
Instantiates a new Topology.Topology(List<Router> routers, ArrayList<TopologyNetwork> networks)
Instantiates a new Topology.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDevice(Device d)
boolean
equals(Object o)
Router
findRouterByName(String name)
Finds router in list by name.Set<Device>
getDevices()
ArrayList<TopologyNetwork>
getNetworks()
Gets network top.List<Router>
getRouters()
Gets routers.int
hashCode()
void
setDevices(Set<Device> devices)
void
setNetworks(ArrayList<TopologyNetwork> networks)
Sets network top.void
setRouters(List<Router> routers)
Sets routers.
-
-
-
Constructor Detail
-
Topology
public Topology(List<Router> routers, ArrayList<TopologyNetwork> networks)
Instantiates a new Topology.- Parameters:
routers
- the routersnetworks
- 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
-
addDevice
public void addDevice(Device d)
-
setRouters
public void setRouters(List<Router> routers)
Sets routers.- Parameters:
routers
- the routers
-
getNetworks
public ArrayList<TopologyNetwork> getNetworks()
Gets network top.- Returns:
- the network top
-
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
-
-