打字猴:1.70046707e+09
1700467070
1700467071 //所有的项目都放在这里ArrayList中
1700467072
1700467073 private ArrayList<IProject>projectList=new ArrayList<IProject>();
1700467074
1700467075 private int currentItem=0;
1700467076
1700467077 //构造函数传入projectList
1700467078
1700467079 public ProjectIterator(ArrayList<IProject>projectList){
1700467080
1700467081 this.projectList=projectList;
1700467082
1700467083 }
1700467084
1700467085 //判断是否还有元素,必须实现
1700467086
1700467087 public boolean hasNext(){
1700467088
1700467089 //定义一个返回值
1700467090
1700467091 boolean b=true;
1700467092
1700467093 if(this.currentItem>=projectList.size()||this.projectList.get(this.currentItem)==null){
1700467094
1700467095 b=false;
1700467096
1700467097 }
1700467098
1700467099 return b;
1700467100
1700467101 }
1700467102
1700467103 //取得下一个值
1700467104
1700467105 public IProject next(){
1700467106
1700467107 return(IProject)this.projectList.get(this.currentItem++);
1700467108
1700467109 }
1700467110
1700467111 //删除一个对象
1700467112
1700467113 public void remove(){
1700467114
1700467115 //暂时没有使用到
1700467116
1700467117 }
1700467118
1700467119 }
[ 上一页 ]  [ :1.70046707e+09 ]  [ 下一页 ]