|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.EnumSet<E>
java.util.MiniEnumSet<E>
final class MiniEnumSet<E extends Enum<E>>
This is a concrete subclass of EnumSet designed specifically for enum type with less than or equal to 64 elements.
| Field Summary |
|---|
| Fields inherited from class java.util.EnumSet |
|---|
elementClass, LANG_BOOTSTRAP |
| Constructor Summary | |
|---|---|
MiniEnumSet(Class<E> elementType,
E[] enums)
Constructs an instance. |
|
| Method Summary | |
|---|---|
boolean |
add(E element)
If the specified element is not contained within this collection, and addition of this element succeeds, then true will be returned. |
boolean |
addAll(Collection<? extends E> collection)
Adds the objects in the specified Collection to this Collection. |
void |
clear()
Removes all the elements in this collection. |
(package private) void |
complement()
|
boolean |
contains(Object object)
Searches this Collection for the specified object. |
boolean |
containsAll(Collection<?> collection)
Searches this Collection for all objects in the specified Collection. |
boolean |
equals(Object object)
Compares the specified object to this Set and answer if they are equal. |
Iterator<E> |
iterator()
Returns an Iterator on the elements of this Collection. |
boolean |
remove(Object object)
Removes the first occurrence of the specified object from this Collection. |
boolean |
removeAll(Collection<?> collection)
Removes all occurrences in this Collection of each object in the specified Collection. |
boolean |
retainAll(Collection<?> collection)
Removes all objects from this Collection that are not contained in the specified Collection. |
(package private) void |
setRange(E start,
E end)
|
int |
size()
Returns the number of elements in this Collection. |
| Methods inherited from class java.util.EnumSet |
|---|
allOf, clone, complementOf, copyOf, copyOf, isValidType, noneOf, of, of, of, of, of, of, range, writeReplace |
| Methods inherited from class java.util.AbstractSet |
|---|
hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
isEmpty, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
isEmpty, toArray, toArray |
| Constructor Detail |
|---|
MiniEnumSet(Class<E> elementType,
E[] enums)
elementType - non-null; type of the elementsenums - non-null; prepopulated array of constants in ordinal
order| Method Detail |
|---|
public Iterator<E> iterator()
AbstractCollection
iterator in interface Iterable<E extends Enum<E>>iterator in interface Collection<E extends Enum<E>>iterator in interface Set<E extends Enum<E>>iterator in class AbstractCollection<E extends Enum<E>>Iteratorpublic int size()
AbstractCollection
size in interface Collection<E extends Enum<E>>size in interface Set<E extends Enum<E>>size in class AbstractCollection<E extends Enum<E>>public void clear()
AbstractCollection
clear in interface Collection<E extends Enum<E>>clear in interface Set<E extends Enum<E>>clear in class AbstractCollection<E extends Enum<E>>Collection.isEmpty(),
Collection.size()public boolean add(E element)
AbstractCollection
add in interface Collection<E extends Enum<E>>add in interface Set<E extends Enum<E>>add in class AbstractCollection<E extends Enum<E>>element - the element to be added.
public boolean addAll(Collection<? extends E> collection)
AbstractCollection
addAll in interface Collection<E extends Enum<E>>addAll in interface Set<E extends Enum<E>>addAll in class AbstractCollection<E extends Enum<E>>collection - the Collection of objects
public boolean contains(Object object)
AbstractCollection
contains in interface Collection<E extends Enum<E>>contains in interface Set<E extends Enum<E>>contains in class AbstractCollection<E extends Enum<E>>object - the object to search for
object is an element of this Collection,
false otherwisepublic boolean containsAll(Collection<?> collection)
AbstractCollection
containsAll in interface Collection<E extends Enum<E>>containsAll in interface Set<E extends Enum<E>>containsAll in class AbstractCollection<E extends Enum<E>>collection - the Collection of objects
public boolean removeAll(Collection<?> collection)
AbstractSet
removeAll in interface Collection<E extends Enum<E>>removeAll in interface Set<E extends Enum<E>>removeAll in class AbstractSet<E extends Enum<E>>collection - the Collection of objects to remove
public boolean retainAll(Collection<?> collection)
AbstractCollection
retainAll in interface Collection<E extends Enum<E>>retainAll in interface Set<E extends Enum<E>>retainAll in class AbstractCollection<E extends Enum<E>>collection - the Collection of objects to retain
public boolean remove(Object object)
AbstractCollection
remove in interface Collection<E extends Enum<E>>remove in interface Set<E extends Enum<E>>remove in class AbstractCollection<E extends Enum<E>>object - the object to remove
public boolean equals(Object object)
AbstractSet
equals in interface Collection<E extends Enum<E>>equals in interface Set<E extends Enum<E>>equals in class AbstractSet<E extends Enum<E>>object - the object to compare with this object
AbstractSet.hashCode()void complement()
complement in class EnumSet<E extends Enum<E>>
void setRange(E start,
E end)
setRange in class EnumSet<E extends Enum<E>>
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||