jp.go.ipa.jgcl
インタフェース JgclCursor

すべてのスーパーインタフェース:
java.util.Enumeration

public interface JgclCursor
extends java.util.Enumeration

配列やリストへの cursor を表わすインターフェース。

cursor は常に要素と要素の間に存在するものと考える。

バージョン:
$Revision: 1.5 $, $Date: 2000/04/26 09:38:51 $
作成者:
Information-technology Promotion Agency, Japan

メソッドの概要
 void gotoHead()
          cursor を先頭に移動する。
 void gotoNext()
          cursor を一つ次に移動する。
 void gotoNext(int n)
          cursor を n 個だけ次に移動する。
 void gotoPrev()
          cursor を一つ前に移動する。
 void gotoPrev(int n)
          cursor を n 個だけ前に移動する。
 void gotoTail()
          cursor を終端に移動する。
 boolean hasNextElements()
          cursor の次に要素があるかどうかを返す。
 boolean hasPrevElements()
          cursor の前に要素があるかどうかを返す。
 void insertAfter(java.lang.Object obj)
          cursor の次に要素 obj を挿入する。
 void insertBefore(java.lang.Object obj)
          cursor の前に要素 obj を挿入する。
 java.lang.Object peekNextElement()
          cursor の次の要素を返す。
 void removeNextElement()
          cursor の次の要素を削除する。
 void removePrevElement()
          cursor の前の要素を削除する。
 void setNextElement(java.lang.Object obj)
          cursor の次の要素を obj に設定する。
 
インタフェース java.util.Enumeration から継承したメソッド
hasMoreElements, nextElement
 

メソッドの詳細

hasNextElements

public boolean hasNextElements()
cursor の次に要素があるかどうかを返す。

hasMoreElements() の別名。

戻り値:
要素があれば true、さもなくば false

hasPrevElements

public boolean hasPrevElements()
cursor の前に要素があるかどうかを返す。
戻り値:
要素があれば true、さもなくば false

peekNextElement

public java.lang.Object peekNextElement()
cursor の次の要素を返す。
戻り値:
次の要素

gotoHead

public void gotoHead()
cursor を先頭に移動する。

gotoTail

public void gotoTail()
cursor を終端に移動する。

gotoNext

public void gotoNext()
cursor を一つ次に移動する。

gotoNext

public void gotoNext(int n)
cursor を n 個だけ次に移動する。
パラメータ:
n - 移動する数

gotoPrev

public void gotoPrev()
cursor を一つ前に移動する。

gotoPrev

public void gotoPrev(int n)
cursor を n 個だけ前に移動する。
パラメータ:
n - 移動する数

removeNextElement

public void removeNextElement()
cursor の次の要素を削除する。

removePrevElement

public void removePrevElement()
cursor の前の要素を削除する。

setNextElement

public void setNextElement(java.lang.Object obj)
cursor の次の要素を obj に設定する。
パラメータ:
obj - 設定する要素

insertAfter

public void insertAfter(java.lang.Object obj)
cursor の次に要素 obj を挿入する。
パラメータ:
obj - 挿入する要素

insertBefore

public void insertBefore(java.lang.Object obj)
cursor の前に要素 obj を挿入する。
パラメータ:
obj - 挿入する要素