📄 dxlistiterator.java
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.//// The original code and portions created by SMB are// Copyright (C) 1997-2000 by SMB GmbH. All rights reserved.//// $Id: DxListIterator.java,v 1.6 2000/10/28 16:55:14 daniela Exp $package org.ozoneDB.DxLib;/** * * * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.6 $Date: 2000/10/28 16:55:14 $ */public class DxListIterator extends DxAbstractIterator { final static long serialVersionUID = 1L; DxListCollection list; DxListNode node; Object currentObject; /** */ public DxListIterator( DxListCollection _list ) { list = _list; reset(); } /** */ public Object object() { return currentObject; } /** */ public Object next() { if (atFirstObject) { atFirstObject = false; } else { if (currentObject != null && !objectRemoved) { node = node.next(); } objectRemoved = false; } currentObject = node != null ? node.data() : null; return currentObject; } /** */ public void reset() { node = list.head().next(); atFirstObject = true; objectRemoved = false; currentObject = null; } /** */ public Object removeObject() { Object answer = currentObject; if (currentObject != null && !objectRemoved) { DxListNode delNode = node; node = node.next(); delNode.remove(); objectRemoved = true; list.decCounter(); currentObject = null; } return answer; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -