@ -80,8 +80,8 @@ public class Car extends BaseClass implements Comparable<Car>{
@@ -80,8 +80,8 @@ public class Car extends BaseClass implements Comparable<Car>{
returnt("Unknown action: {}",params.get(ACTION));
}
publicstaticCarget(Objectid){
returncars.get(Integer.parseInt(""+id));// try to get by id
publicstaticCarget(Objectid){
returnisNull(id)?null:cars.get(Integer.parseInt(""+id));// try to get by id
}
@ -224,6 +224,10 @@ public class Car extends BaseClass implements Comparable<Car>{
@@ -224,6 +224,10 @@ public class Car extends BaseClass implements Comparable<Car>{
@ -127,7 +127,8 @@ public class Locomotive extends Car implements Constants,Device{
@@ -127,7 +127,8 @@ public class Locomotive extends Car implements Constants,Device{
publicObjectfaster(intsteps){
returnsetSpeed(speed+steps);
setSpeed(speed+steps);
returnproperties();
}
publicstaticLocomotiveget(Objectid){
@ -286,7 +287,7 @@ public class Locomotive extends Car implements Constants,Device{
@@ -286,7 +287,7 @@ public class Locomotive extends Car implements Constants,Device{