java.lang.Iterable<E>, java.util.Collection<E>, Configurable, Writable@Public @Stable public class EnumSetWritable<E extends java.lang.Enum<E>> extends java.util.AbstractCollection<E> implements Writable, Configurable
| Constructor | Description |
|---|---|
EnumSetWritable(java.util.EnumSet<E> value) |
Construct a new EnumSetWritable.
|
EnumSetWritable(java.util.EnumSet<E> value,
java.lang.Class<E> elementType) |
Construct a new EnumSetWritable.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(E e) |
|
boolean |
equals(java.lang.Object o) |
Returns true if
o is an EnumSetWritable with the same value,
or both are null. |
java.util.EnumSet<E> |
get() |
Return the value of this EnumSetWritable.
|
Configuration |
getConf() |
Return the configuration used by this object.
|
java.lang.Class<E> |
getElementType() |
Returns the class of all the elements of the underlying EnumSetWriable.
|
int |
hashCode() |
|
java.util.Iterator<E> |
iterator() |
|
void |
readFields(java.io.DataInput in) |
Deserialize the fields of this object from
in. |
void |
set(java.util.EnumSet<E> value,
java.lang.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() |
|
java.lang.String |
toString() |
|
void |
write(java.io.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, waitpublic EnumSetWritable(java.util.EnumSet<E> value, java.lang.Class<E> elementType)
value - enumSet value.elementType - elementType.public EnumSetWritable(java.util.EnumSet<E> value)
value - enumSet value.public java.util.Iterator<E> iterator()
public int size()
public boolean add(E e)
public void set(java.util.EnumSet<E> value, java.lang.Class<E> elementType)
value - enumSet Value.elementType - elementType.public java.util.EnumSet<E> get()
public void readFields(java.io.DataInput in)
throws java.io.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.java.io.IOException - any other problem for readFields.public void write(java.io.DataOutput out)
throws java.io.IOException
Writableout.public boolean equals(java.lang.Object o)
o is an EnumSetWritable with the same value,
or both are null.public java.lang.Class<E> getElementType()
public int hashCode()
public java.lang.String toString()
public Configuration getConf()
ConfigurablegetConf in interface Configurablepublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurableconf - configuration to be usedCopyright © 2008–2025 Apache Software Foundation. All rights reserved.