Class LinkedList
java.lang.Object
|
+----LinkedList
- public class LinkedList
- extends Object
- implements Serializable
リスト構造
-
LinkedList()
-
-
append(Object)
- insert after the tail of the list
-
connect(LinkedList)
-
-
copy()
-
-
currentElement()
-
-
elements()
-
-
hasMoreElements()
-
-
head()
-
-
insert(Object)
- insert before the iterator position
-
member(Object)
- 同じ要素があるか調べる
-
merge(LinkedList)
- 先方の中から異なるものだけ append する
-
nextElement()
- get current element and move the cursor to the next position
-
remove()
- remove the element under the cursor
-
remove(Object)
-
-
reset()
-
resets the cursor
-
size()
-
-
substitute(LinkedList)
-
-
tail()
-
LinkedList
public LinkedList()
copy
public LinkedList copy()
substitute
public void substitute(LinkedList l)
member
public boolean member(Object element)
- 同じ要素があるか調べる
merge
public void merge(LinkedList l)
- 先方の中から異なるものだけ append する
remove
public void remove(Object object)
head
public Object head()
tail
public Object tail()
connect
public void connect(LinkedList l)
reset
public void reset()
- resets the cursor
hasMoreElements
public boolean hasMoreElements()
- Returns:
- true iff the cursor is not at the end of the
list
nextElement
public Object nextElement()
- get current element and move the cursor to the next position
- Returns:
- the current element (before advancing the
position)
- Throws: NoSuchElementException
- if already at the
end of the list
currentElement
public Object currentElement()
- Returns:
- the current element under the cursor
- Throws: NoSuchElementException
- if already at the
end of the list
insert
public void insert(Object n)
- insert before the iterator position
- Parameters:
- n - the object to insert
append
public void append(Object n)
- insert after the tail of the list
- Parameters:
- n - - the value to insert
remove
public Object remove()
- remove the element under the cursor
- Returns:
- the removed element
- Throws: NoSuchElementException
- if already at the
end of the list
size
public int size()
- Returns:
- the number of elements in the list
elements
public Enumeration elements()
- Returns:
- an enumeration to iterate through all elements
in the list