E - the type of enum being stored in this set.public class StreamableEnumSet<E extends Enum<E>> extends AbstractSet<E> implements Cloneable, Streamable
EnumSet equivalent (not a subclass, because EnumSet's implementation is private)
that can be streamed.StreamableStreamable.Closure| Constructor and Description |
|---|
StreamableEnumSet(Class<E> elementType)
Creates a new, empty enum set for storing elements of the specified class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
static <E extends Enum<E>> |
allOf(Class<E> elementType)
Creates a set containing all elements of the specified type.
|
void |
clear() |
StreamableEnumSet<E> |
clone() |
static <E extends Enum<E>> |
complementOf(StreamableEnumSet<E> s)
Creates a set containing all elements not in the set provided.
|
boolean |
contains(Object o) |
static <E extends Enum<E>> |
copyOf(Collection<E> s)
Creates a set containing all elements in the collection provided (which must have at least
one element, unless it is a
StreamableEnumSet). |
static <E extends Enum<E>> |
copyOf(StreamableEnumSet<E> s)
Creates a set containing all elements in the set provided.
|
Iterator<E> |
iterator() |
static <E extends Enum<E>> |
noneOf(Class<E> elementType)
Creates an empty set of the specified type.
|
static <E extends Enum<E>> |
of(E first,
E... rest)
Creates a set consisting of the specified elements.
|
static <E extends Enum<E>> |
range(E from,
E to)
Creates a set that includes all enum constants in the specified (inclusive) range.
|
void |
readObject(ObjectInputStream in)
Reads our custom streamable fields.
|
boolean |
remove(Object o) |
int |
size() |
void |
writeObject(ObjectOutputStream out)
Writes our custom streamable fields.
|
equals, hashCode, removeAlladdAll, containsAll, isEmpty, retainAll, toArray, toArray, toStringaddAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static <E extends Enum<E>> StreamableEnumSet<E> noneOf(Class<E> elementType)
public static <E extends Enum<E>> StreamableEnumSet<E> allOf(Class<E> elementType)
public static <E extends Enum<E>> StreamableEnumSet<E> copyOf(Collection<E> s)
StreamableEnumSet).public static <E extends Enum<E>> StreamableEnumSet<E> copyOf(StreamableEnumSet<E> s)
public static <E extends Enum<E>> StreamableEnumSet<E> complementOf(StreamableEnumSet<E> s)
public static <E extends Enum<E>> StreamableEnumSet<E> of(E first, E... rest)
public static <E extends Enum<E>> StreamableEnumSet<E> range(E from, E to)
public int size()
public boolean contains(Object o)
public boolean add(E o)
public boolean remove(Object o)
public void clear()
public StreamableEnumSet<E> clone()
public void writeObject(ObjectOutputStream out) throws IOException
IOExceptionpublic void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionCopyright © 2015. All rights reserved.