zoukankan      html  css  js  c++  java
  • List<T>泛型 之 FindIndex

    public int FindIndex(int startIndex,int count,Predicate<T> match)

    {

      //判断起始索引是否大于总长度

      if(startIndex>this._size)

      {

        return -1;

      }

      if((count<0) || (startIndex > (this.size-count)))

      {

        return -1;

      }

      if(match==null)

      {

        return -1;

      }

      int num=startIndex+count;

      for(int i=startIndex; i<num; i++)

      {

        if(match(this._items[i]))

        {

          return i;

        }

      }

        return -1;

    }

  • 相关阅读:
    nodejs获取服务器数据到页面
    Struts 2
    JQuery
    JDBC
    Hiberbate
    EasyUi
    JavaScript
    利用 HashSet 去过滤元素是否重复
    HTML
    MySQL
  • 原文地址:https://www.cnblogs.com/p_db/p/2370498.html
Copyright © 2011-2022 走看看