Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
public String getLookup(testFlowStruct row_Main) {
int lowerBound = 0;
int upperBound = array_tIntervalMatch_2.length - 1;
while (true) {
int currentIndex = (lowerBound + upperBound) / 2;
String tmpMain = row_Main.batchId;
String tmpMin = array_tIntervalMatch_2.startIpNum;
String tmpMax = array_tIntervalMatch_2.endIpNum;
if (tmpMain == null) {
return null;
}
if ((tmpMin == null && tmpMax != null && tmpMain
.compareTo(tmpMax) <= 0)
|| (tmpMin != null
&& tmpMax == null && tmpMain
.compareTo(tmpMin) >= 0)
|| (tmpMin != null
&& tmpMax != null
&& tmpMain
.compareTo(tmpMin) >= 0 && tmpMain
.compareTo(tmpMax) <= 0)) {
return array_tIntervalMatch_2.rest;
} else if (lowerBound > upperBound) {
return null;
} else {
if (tmpMin != null
&& tmpMain.compareTo(tmpMin) < 0) {
upperBound = currentIndex - 1;
} else if (tmpMin != null
&& tmpMain.compareTo(tmpMin) > 0) {
lowerBound = currentIndex + 1;
} else {
upperBound = currentIndex - 1;
}
}
}
}