fix interpolation for alphabetic
This commit is contained in:
parent
925e42546d
commit
b57b7ef268
1 changed files with 13 additions and 8 deletions
|
@ -113,15 +113,20 @@ public class Building extends MapObject {
|
||||||
String fname = super.getName();
|
String fname = super.getName();
|
||||||
int numB = Algorithms.extractFirstIntegerNumber(fname);
|
int numB = Algorithms.extractFirstIntegerNumber(fname);
|
||||||
int numT = numB;
|
int numT = numB;
|
||||||
if (num >= numB) {
|
|
||||||
String sname = getName2();
|
String sname = getName2();
|
||||||
if (getInterpolationType() == BuildingInterpolation.ALPHABETIC) {
|
|
||||||
|
if (getInterpolationType() == BuildingInterpolation.ALPHABETIC && num == numB) {
|
||||||
char ch = hno.charAt(hno.length() - 1);
|
char ch = hno.charAt(hno.length() - 1);
|
||||||
char chF = fname.charAt(fname.length() - 1);
|
char chF = fname.charAt(fname.length() - 1);
|
||||||
if (chF < ch) {
|
char chS = sname.charAt(sname.length() - 1);
|
||||||
|
if (chS < chF && chF < ch) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (chS > chF && ch < chF) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (num >= numB) {
|
||||||
if (fname.contains("-") && sname == null) {
|
if (fname.contains("-") && sname == null) {
|
||||||
int l = fname.indexOf('-');
|
int l = fname.indexOf('-');
|
||||||
sname = fname.substring(l + 1, fname.length());
|
sname = fname.substring(l + 1, fname.length());
|
||||||
|
|
Loading…
Reference in a new issue