T - the type of object stored by this classpublic class ClassIndexedSet<T> extends AbstractSet<T> implements Set<T>
| 修飾子とタイプ | クラスと説明 |
|---|---|
protected class |
ClassIndexedSet.ClassIndexedSetIterator
Iterator for set implementation
ClassIndexedSet. |
| コンストラクタと説明 |
|---|
ClassIndexedSet()
Constructor.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
add(T o) |
boolean |
add(T o,
boolean replace)
Add member to set, optionally replacing any existing instance of the
same class.
|
void |
clear() |
boolean |
contains(Class<? extends T> clazz)
Check whether set contains an instance of the specified class.
|
<X extends T> |
get(Class<X> clazz)
Get the set element specified by the class parameter.
|
protected Class<? extends T> |
getIndexClass(Object o)
Get the index class of the specified object.
|
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAlladdAll, contains, containsAll, isEmpty, retainAll, toArray, toArray, toStringpublic boolean add(T o)
add インタフェース内 Collection<T>add インタフェース内 Set<T>add クラス内 AbstractCollection<T>public boolean add(T o, boolean replace) throws NullPointerException, IllegalArgumentException
o - the object to addreplace - flag indicating whether to replace an existing class typeIllegalArgumentException - if set already contained an instance of the object's class
and replacement was specified as falseNullPointerException - if the object to add was nullpublic void clear()
clear インタフェース内 Collection<T>clear インタフェース内 Set<T>clear クラス内 AbstractCollection<T>public boolean remove(Object o)
remove インタフェース内 Collection<T>remove インタフェース内 Set<T>remove クラス内 AbstractCollection<T>public int size()
size インタフェース内 Collection<T>size インタフェース内 Set<T>size クラス内 AbstractCollection<T>public boolean contains(Class<? extends T> clazz)
clazz - the class to checkpublic <X extends T> X get(Class<X> clazz)
X - generic parameter which eliminates need for casting by the callerclazz - the class to whose instance is to be retrievedprotected Class<? extends T> getIndexClass(Object o)
o - the object whose class index to determineCopyright © 2012. All Rights Reserved.