Class CableRoute


  • public class CableRoute
    extends java.lang.Object
    Class for Routes between Cities (similar to a struct in C)
    Author:
    Klara Schöbel
    • Constructor Detail

      • CableRoute

        public CableRoute​(CableConfig cableType,
                          City cityA,
                          City cityB)
        Constructs a cable-route between to cities with a certain cable-type
        Parameters:
        cableType - cable(-type) this route is built with (see also getType())
        cityA - "starting" point of this route (see also getCityA())
        cityB - "ending" point of this route (see also getCityB())
    • Method Detail

      • getType

        public CableConfig getType()
        getter for cableType
        Returns:
        the Cable object holding all the information on this particular cable(-type)
      • getNum

        public int getNum()
        getter for num
        Returns:
        number of cables in this route
      • getVal

        public int getVal()
        getter for value
        Returns:
        the value of the entire route
      • getCityA

        public City getCityA()
        getter for cityA
        Returns:
        the "starting" city
      • getCityB

        public City getCityB()
        getter for cityB
        Returns:
        the "ending" city
      • getDistance

        public int getDistance()
        getter for the distance
        Returns:
        distance this route covers