1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

refine VehicleImpl.toString() and Skills.toString()

This commit is contained in:
oblonski 2014-11-04 16:28:39 +01:00
parent d07a2766cd
commit fbc69fd80e
2 changed files with 34 additions and 1 deletions

View file

@ -1,3 +1,20 @@
/*******************************************************************************
* Copyright (C) 2014 Stefan Schroeder
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package jsprit.core.problem; package jsprit.core.problem;
import java.util.Collection; import java.util.Collection;
@ -71,6 +88,20 @@ public class Skills {
return Collections.unmodifiableSet(skills); return Collections.unmodifiableSet(skills);
} }
public String toString(){
String s = "[";
boolean first = true;
for(String skill : values()){
if(first){
s += skill;
first = false;
}
else s += ", " + skill;
}
s += "]";
return s;
}
/** /**
* Not case sensitive. * Not case sensitive.
* *

View file

@ -315,7 +315,9 @@ public class VehicleImpl extends AbstractVehicle{
"[startLocationCoordinate=" + startLocationCoord + "]" + "[startLocationCoordinate=" + startLocationCoord + "]" +
"[endLocationId=" + endLocationId+"]" + "[endLocationId=" + endLocationId+"]" +
"[endLocationCoordinate=" + endLocationCoord + "]" + "[endLocationCoordinate=" + endLocationCoord + "]" +
"[isReturnToDepot=" + isReturnToDepot() + "]"; "[isReturnToDepot=" + isReturnToDepot() + "]" +
"[skills="+ skills + "]";
} }
@Override @Override