|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.Connection
helper to represent a connection between two stations
| Field Summary | |
private java.util.LinkedList |
connectionsOnWayToNextStation
contains the IDs of the tracks and switches between start- and destinationStation |
private int |
costs
the costs of the connection |
private int |
destinationStationId
the id of the destination station of the connection |
private java.lang.String |
destinationStationName
the name of the destination station |
private int |
numberOfTracks
the no of tracks of the connection |
private int |
startStationId
the id of the start station of the connection |
private int |
time
the time a shuttle will need using the connection |
| Constructor Summary | |
(package private) |
Connection(int sId)
Constructor of a connection |
| Method Summary | |
protected void |
addConnection(int Id)
Adds a new track to the connction |
protected Connection |
cloneConnection()
Clone the connection and all internal values |
protected int |
getCosts()
Gets the costs attribute of the Connection object |
protected int |
getDestinationStationId()
Gets the destinationStationId attribute of the Connection object |
protected java.lang.String |
getDestinationStationName()
Gets the destinationStationName attribute of the Connection object |
protected int |
getLastConnectionId()
Gets the lastConnectionId attribute of the Connection object |
protected int |
getNumberOfTracks()
Gets the numberOfTracks attribute of the Connection object |
protected int |
getStartStationId()
Gets the start station id of the connection. |
protected int |
getTime()
Gets the time attribute of the Connection object |
protected void |
increaseCostsAndTime(int c,
int t)
Increases the costs and time values of the connection. |
protected void |
increaseNumberOfTracks()
Increases the numberOfTracks attribute of the Connection object |
protected void |
setCosts(int costs)
Sets the costs attribute of the Connection object |
protected void |
setDestinationStationId(int Id)
Sets the destinationStationId attribute of the Connection object |
protected void |
setDestinationStationName(java.lang.String name)
Sets the destinationStationName attribute of the Connection object |
protected void |
setNumberOfTracks(int numberOfTracks)
Sets the numberOfTracks attribute of the Connection object |
protected void |
setTime(int time)
Sets the time attribute of the Connection object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.LinkedList connectionsOnWayToNextStation
private int startStationId
private int destinationStationId
private int costs
private int time
private int numberOfTracks
private java.lang.String destinationStationName
| Constructor Detail |
Connection(int sId)
sId - the id of the start station| Method Detail |
protected int getStartStationId()
protected void increaseCostsAndTime(int c,
int t)
c - The amount the costs value should be increased by.t - The amount the time value should be increased by.protected void increaseNumberOfTracks()
protected int getNumberOfTracks()
protected void setNumberOfTracks(int numberOfTracks)
numberOfTracks - The new numberOfTracks valueprotected int getCosts()
protected void setCosts(int costs)
costs - The new costs valueprotected int getTime()
protected void setTime(int time)
time - The new time valueprotected void setDestinationStationId(int Id)
Id - The new destinationStationId valueprotected int getDestinationStationId()
protected void setDestinationStationName(java.lang.String name)
name - The new destinationStationName valueprotected java.lang.String getDestinationStationName()
protected void addConnection(int Id)
Id - The track id valueprotected int getLastConnectionId()
protected Connection cloneConnection()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||