|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.walend.enum.AbstractEnum
A utility class that implements all of Enum's methods by delegating them to an underlying immutable Set. Concrete subclasses should be singletons. They should override readResolve() to return the singleton value.
| Field Summary | |
private java.util.Set |
set
|
| Constructor Summary | |
protected |
AbstractEnum(java.util.Set memberSet)
|
| Method Summary | |
boolean |
add(java.lang.Object o)
This method always throws an UnsupportedOperationException. |
boolean |
addAll(java.util.Collection c)
This method always throws an UnsupportedOperationException. |
void |
clear()
This method always throws an UnsupportedOperationException. |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object o)
This method always throws an UnsupportedOperationException. |
boolean |
removeAll(java.util.Collection c)
This method always throws an UnsupportedOperationException. |
boolean |
retainAll(java.util.Collection c)
This method always throws an UnsupportedOperationException. |
int |
size()
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private final java.util.Set set
| Constructor Detail |
protected AbstractEnum(java.util.Set memberSet)
| Method Detail |
public int size()
size in interface java.util.Setpublic boolean isEmpty()
isEmpty in interface java.util.Setpublic boolean contains(java.lang.Object o)
contains in interface java.util.Setpublic java.util.Iterator iterator()
iterator in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Setpublic boolean add(java.lang.Object o)
add in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public boolean remove(java.lang.Object o)
remove in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.Setpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public void clear()
clear in interface java.util.Setjava.lang.UnsupportedOperationException - because this is an immutable object.public boolean equals(java.lang.Object o)
equals in interface java.util.Setequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.SethashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||