@InterfaceAudience.Public @InterfaceStability.Stable public class EnumSetWritable<E extends Enum<E>> extends AbstractCollection<E> implements Writable, Configurable
| Constructor and Description | 
|---|
EnumSetWritable(EnumSet<E> value)
Construct a new EnumSetWritable. 
 | 
EnumSetWritable(EnumSet<E> value,
               Class<E> elementType)
Construct a new EnumSetWritable. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
add(E e)  | 
boolean | 
equals(Object o)
Returns true if  
o is an EnumSetWritable with the same value,
 or both are null. | 
EnumSet<E> | 
get()
Return the value of this EnumSetWritable. 
 | 
Configuration | 
getConf()
Return the configuration used by this object. 
 | 
Class<E> | 
getElementType()
Returns the class of all the elements of the underlying EnumSetWriable. 
 | 
int | 
hashCode()  | 
Iterator<E> | 
iterator()  | 
void | 
readFields(DataInput in)
Deserialize the fields of this object from  
in. | 
void | 
set(EnumSet<E> value,
   Class<E> elementType)
reset the EnumSetWritable with specified
 value and elementType. 
 | 
void | 
setConf(Configuration conf)
Set the configuration to be used by this object. 
 | 
int | 
size()  | 
String | 
toString()  | 
void | 
write(DataOutput out)
Serialize the fields of this object to  
out. | 
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, spliterator, streampublic EnumSetWritable(EnumSet<E> value, Class<E> elementType)
value - elementType - public int size()
size in interface Collection<E extends Enum<E>>size in class AbstractCollection<E extends Enum<E>>public boolean add(E e)
add in interface Collection<E extends Enum<E>>add in class AbstractCollection<E extends Enum<E>>public void set(EnumSet<E> value, Class<E> elementType)
value - elementType - public void readFields(DataInput in) throws IOException
Writablein.  
 
 For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.IOExceptionpublic void write(DataOutput out) throws IOException
Writableout.write in interface Writableout - DataOuput to serialize this object into.IOExceptionpublic boolean equals(Object o)
o is an EnumSetWritable with the same value,
 or both are null.public Class<E> getElementType()
public int hashCode()
public String toString()
toString in class AbstractCollection<E extends Enum<E>>public Configuration getConf()
ConfigurablegetConf in interface Configurablepublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurableconf - configuration to be usedCopyright © 2020 Apache Software Foundation. All rights reserved.