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, subListpublic SingletonList(Object element)
element - the single member of the listpublic int size()
size インタフェース内 Collectionsize インタフェース内 Listsize クラス内 AbstractCollectionpublic Object get(int index)
get インタフェース内 Listget クラス内 AbstractListIndexOutOfBoundsException - if index is not 0Copyright © 2001-2013 Codehaus. All Rights Reserved.