childIDs 数组
cid 要插入的对象
int index = Collections.binarySearch(childIDs, cid);
if (index < 0) {
childIDs.insertElementAt(cid, (index + 1) * -1);
stack.push(cid);
}
Collections.binarySearch,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/lightning95/p/3793129.html