Fix unnecessary boxing/unboxing
This commit is contained in:
parent
1bdb389eae
commit
1eea84da0b
3 changed files with 7 additions and 7 deletions
|
@ -227,13 +227,13 @@ public class BinaryInspector {
|
||||||
String pattern = partsToExtractFrom.get(f);
|
String pattern = partsToExtractFrom.get(f);
|
||||||
boolean minus = true;
|
boolean minus = true;
|
||||||
for (int i = 0; i < indexes[c].getIndexes().size(); i++) {
|
for (int i = 0; i < indexes[c].getIndexes().size(); i++) {
|
||||||
partsSet[c].add(new Float(i + 1f));
|
partsSet[c].add(i + 1f);
|
||||||
BinaryIndexPart part = indexes[c].getIndexes().get(i);
|
BinaryIndexPart part = indexes[c].getIndexes().get(i);
|
||||||
if(part instanceof MapIndex){
|
if(part instanceof MapIndex){
|
||||||
List<MapRoot> roots = ((MapIndex) part).getRoots();
|
List<MapRoot> roots = ((MapIndex) part).getRoots();
|
||||||
int rsize = roots.size();
|
int rsize = roots.size();
|
||||||
for(int j=0; j<rsize; j++){
|
for(int j=0; j<rsize; j++){
|
||||||
partsSet[c].add(new Float((i+1f)+(j+1)/10f));
|
partsSet[c].add((i + 1f) + (j + 1) / 10f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ public class BinaryInspector {
|
||||||
if (!partSet.contains(Float.valueOf(i + 1f))) {
|
if (!partSet.contains(Float.valueOf(i + 1f))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
list.add(new Float(i + 1f));
|
list.add(i + 1f);
|
||||||
|
|
||||||
BinaryIndexPart part = index.getIndexes().get(i);
|
BinaryIndexPart part = index.getIndexes().get(i);
|
||||||
String map;
|
String map;
|
||||||
|
@ -388,7 +388,7 @@ public class BinaryInspector {
|
||||||
}
|
}
|
||||||
String name = p.getName() == null ? "" : p.getName();
|
String name = p.getName() == null ? "" : p.getName();
|
||||||
println(MessageFormat.format("{0} {1} data {3} - {2,number,#} bytes",
|
println(MessageFormat.format("{0} {1} data {3} - {2,number,#} bytes",
|
||||||
new Object[]{Integer.valueOf(i), partname, p.getLength(), name}));
|
new Object[]{i, partname, p.getLength(), name}));
|
||||||
if(p instanceof TransportIndex){
|
if(p instanceof TransportIndex){
|
||||||
TransportIndex ti = ((TransportIndex) p);
|
TransportIndex ti = ((TransportIndex) p);
|
||||||
int sh = (31 - BinaryMapIndexReader.TRANSPORT_STOP_ZOOM);
|
int sh = (31 - BinaryMapIndexReader.TRANSPORT_STOP_ZOOM);
|
||||||
|
@ -449,7 +449,7 @@ public class BinaryInspector {
|
||||||
int type = cityType[j];
|
int type = cityType[j];
|
||||||
final List<City> cities = index.getCities(region, null, type);
|
final List<City> cities = index.getCities(region, null, type);
|
||||||
|
|
||||||
print(MessageFormat.format("\t{0}, {1,number,#} group(s)", new Object[]{cityType_String[j], Integer.valueOf(cities.size())}));
|
print(MessageFormat.format("\t{0}, {1,number,#} group(s)", new Object[]{cityType_String[j], cities.size()}));
|
||||||
if (BinaryMapAddressReaderAdapter.CITY_TOWN_TYPE == type) {
|
if (BinaryMapAddressReaderAdapter.CITY_TOWN_TYPE == type) {
|
||||||
if (!verbose.vstreetgroups && !verbose.vcities) {
|
if (!verbose.vstreetgroups && !verbose.vcities) {
|
||||||
println("");
|
println("");
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class GeneralRouter extends VehicleRouter {
|
||||||
RouteTypeRule r = reg.quickGetEncodingRule(types[i]);
|
RouteTypeRule r = reg.quickGetEncodingRule(types[i]);
|
||||||
Float sp = highwaySpeed.get(r.getTag()+"$"+r.getValue());
|
Float sp = highwaySpeed.get(r.getTag()+"$"+r.getValue());
|
||||||
if(sp != null){
|
if(sp != null){
|
||||||
if(sp.floatValue() > 0) {
|
if(sp > 0) {
|
||||||
accepted = true;
|
accepted = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class NewGeneralRouter extends VehicleRouter {
|
||||||
boolean val = false;
|
boolean val = false;
|
||||||
if(defParams.containsKey(p)) {
|
if(defParams.containsKey(p)) {
|
||||||
RoutingParameter t = defParams.get(p);
|
RoutingParameter t = defParams.get(p);
|
||||||
val = t.type == RoutingParameterType.BOOLEAN && t.value != null && ((Boolean)t.value).booleanValue();
|
val = t.type == RoutingParameterType.BOOLEAN && t.value != null && (Boolean) t.value;
|
||||||
}
|
}
|
||||||
if(not && val){
|
if(not && val){
|
||||||
parameterValue = false;
|
parameterValue = false;
|
||||||
|
|
Loading…
Reference in a new issue