首页 > 其他 > 详细

Collections.binarySearch

时间:2014-06-18 10:28:26      阅读:276      评论:0      收藏:0      [点我收藏+]

childIDs 数组

cid 要插入的对象

int index = Collections.binarySearch(childIDs, cid);
     if (index < 0) {
      childIDs.insertElementAt(cid, (index + 1) * -1);
      stack.push(cid);
     }

Collections.binarySearch,布布扣,bubuko.com

Collections.binarySearch

原文:http://www.cnblogs.com/lightning95/p/3793129.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!