Package core.components.factories
Class StationFactory
- java.lang.Object
-
- core.components.factories.StationFactory
-
public class StationFactory extends java.lang.ObjectThe StationFactory class : This is the factory to create and add new station to a give system. It can add plus or standard stations. It is uses the simple factory design pattern
-
-
Constructor Summary
Constructors Constructor Description StationFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StationaddPlusStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots)This method creates a plus station and add it to a given system with fewer arguments.static StationaddPlusStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots, double money, int numberOfDroppings)This method creates a plus station and add it to a given system.static StationaddStandardStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots)This method creates a standard station and add it to a given system with fewer arguments.static StationaddStandardStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots, double money, int numberOfDroppings)This method creates a standard station and add it to a given system.
-
-
-
Method Detail
-
addPlusStation
public static Station addPlusStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots, double money, int numberOfDroppings)
This method creates a plus station and add it to a given system.- Parameters:
system- the system that will have the new stationcoordinate- the coordinate of the stationonService- the onService booleanparkingSlots- a list of parking slotsmoney- the initial money of the stationnumberOfDroppings- the (initial) number of droppings- Returns:
- the PlusStation instance
-
addPlusStation
public static Station addPlusStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots)
This method creates a plus station and add it to a given system with fewer arguments. It can be simpler in some cases.- Parameters:
system- the system that will have the new stationcoordinate- the coordinate of the stationonService- the onService booleanparkingSlots- a list of parking slots- Returns:
- the PlusStation instance
-
addStandardStation
public static Station addStandardStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots, double money, int numberOfDroppings)
This method creates a standard station and add it to a given system.- Parameters:
system- the system that will have the new stationcoordinate- the coordinate of the stationonService- the onService booleanparkingSlots- a list of parking slotsmoney- the initial money of the stationnumberOfDroppings- the (initial) number of droppings- Returns:
- the StandardStation instance
-
addStandardStation
public static Station addStandardStation(MyVelibSystem system, java.awt.Point coordinate, boolean onService, java.util.List<ParkingSlot> parkingSlots)
This method creates a standard station and add it to a given system with fewer arguments. It can be simpler in some cases.- Parameters:
system- the system that will have the new stationcoordinate- the coordinate of the stationonService- the onService booleanparkingSlots- a list of parking slots- Returns:
- the StandardStation instance
-
-