Collections.binarySearch
childIDs 数组
cid 要插入的对象
int index = Collections.binarySearch(childIDs, cid);
if (index < 0) {
childIDs.insertElementAt(cid, (index + 1) * -1);
stack.push(cid);
}
childIDs 数组
cid 要插入的对象
int index = Collections.binarySearch(childIDs, cid);
if (index < 0) {
childIDs.insertElementAt(cid, (index + 1) * -1);
stack.push(cid);
}