public class SingletonList extends AbstractList
add()
and remove()
throw
UnsupportedOperationExceptions.modCount
コンストラクタと説明 |
---|
SingletonList(Object element)
Creates a new singleton list.
|
修飾子とタイプ | メソッドと説明 |
---|---|
Object |
get(int index)
Returns the single element in the list.
|
int |
size()
Returns 1.
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
public SingletonList(Object element)
element
- the single member of the listpublic int size()
size
インタフェース内 Collection
size
インタフェース内 List
size
クラス内 AbstractCollection
public Object get(int index)
get
インタフェース内 List
get
クラス内 AbstractList
IndexOutOfBoundsException
- if index is not 0Copyright © 2001-2013 Codehaus. All Rights Reserved.