mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final1.git
synced 2024-11-24 09:24:58 +00:00
Checkstyle
This commit is contained in:
parent
5b9f9b8da7
commit
7e39a97dd4
@ -22,7 +22,8 @@ public class FreightCoach extends Coach {
|
||||
* @param couplingBack whether the coach should have a back coupling
|
||||
* @throws InvalidInputException on invalid user input (zero-sized coach)
|
||||
*/
|
||||
public FreightCoach(int identifier, int length, boolean couplingFront, boolean couplingBack) throws InvalidInputException {
|
||||
public FreightCoach(int identifier, int length, boolean couplingFront, boolean couplingBack)
|
||||
throws InvalidInputException {
|
||||
super(identifier, length, couplingFront, couplingBack);
|
||||
}
|
||||
|
||||
|
@ -166,6 +166,8 @@ public class ModelRailwaySimulation {
|
||||
case SPECIAL:
|
||||
coaches.put(id, new SpecialCoach(id, length, couplingFront, couplingBack));
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("coach type is null");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
@ -191,7 +193,7 @@ public class ModelRailwaySimulation {
|
||||
Terminal.printLine("No coach exists");
|
||||
} else {
|
||||
coach: for (Integer identifier : coaches.keySet().stream().sorted().collect(Collectors.toList())) {
|
||||
Coach coach = coaches.get(identifier);
|
||||
Coach coach = coaches.get(identifier);
|
||||
for (Train train : trains.values()) {
|
||||
if (train.contains(coach)) {
|
||||
Terminal.printLine(String.format("%d %s %s %d %b %b",
|
||||
|
@ -23,7 +23,8 @@ public class PassengerCoach extends Coach {
|
||||
* @param couplingBack whether the coach should have a back coupling
|
||||
* @throws InvalidInputException on invalid user input (zero-sized coach)
|
||||
*/
|
||||
public PassengerCoach(int identifier, int length, boolean couplingFront, boolean couplingBack) throws InvalidInputException {
|
||||
public PassengerCoach(int identifier, int length, boolean couplingFront, boolean couplingBack)
|
||||
throws InvalidInputException {
|
||||
super(identifier, length, couplingFront, couplingBack);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,8 @@ public class SpecialCoach extends Coach {
|
||||
* @param couplingBack whether the coach should have a back coupling
|
||||
* @throws InvalidInputException on invalid user input (zero-sized coach)
|
||||
*/
|
||||
public SpecialCoach(int identifier, int length, boolean couplingFront, boolean couplingBack) throws InvalidInputException {
|
||||
public SpecialCoach(int identifier, int length, boolean couplingFront, boolean couplingBack)
|
||||
throws InvalidInputException {
|
||||
super(identifier, length, couplingFront, couplingBack);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user