Class EnumSetFieldSetMarshaller<E extends Enum<E>>
java.lang.Object
org.wildfly.clustering.marshalling.protostream.util.EnumSetFieldSetMarshaller<E>
- Type Parameters:
E- the enum type for this marshaller
- All Implemented Interfaces:
FieldReadable<EnumSetBuilder<E>>,FieldSetMarshaller<EnumSet<E>,,EnumSetBuilder<E>> FieldSetMarshaller.Supplied<EnumSet<E>,,EnumSetBuilder<E>> Writable<EnumSet<E>>
public class EnumSetFieldSetMarshaller<E extends Enum<E>>
extends Object
implements FieldSetMarshaller.Supplied<EnumSet<E>,EnumSetBuilder<E>>
Marshaller for the fields of an
EnumSet.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.FieldSetMarshaller
FieldSetMarshaller.Simple<T>, FieldSetMarshaller.Supplied<T,V extends Supplier<T>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a builder for use with.invalid reference
#readField(ProtoStreamReader, Object)intReturns the number of fields in this field setreadFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, EnumSetBuilder<E> builder) Reads a single field from the specified reader.voidwriteTo(ProtoStreamWriter writer, EnumSet<E> set) Writes the specified object to the specified writer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldReadable
nextIndexMethods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldSetMarshaller
asMarshaller, asMarshallerMethods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldSetMarshaller.Supplied
build
-
Constructor Details
-
EnumSetFieldSetMarshaller
public EnumSetFieldSetMarshaller()
-
-
Method Details
-
createInitialValue
Description copied from interface:FieldSetMarshallerReturns a builder for use with. May return a shared instance, if the builder type is immutable, or a new instance, if the builder is mutable.invalid reference
#readField(ProtoStreamReader, Object)- Specified by:
createInitialValuein interfaceFieldSetMarshaller<EnumSet<E extends Enum<E>>,EnumSetBuilder<E extends Enum<E>>> - Returns:
- a builder.
-
getFields
public int getFields()Description copied from interface:FieldReadableReturns the number of fields in this field set- Specified by:
getFieldsin interfaceFieldReadable<E extends Enum<E>>- Returns:
- a number of fields
-
readFrom
public EnumSetBuilder<E> readFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, EnumSetBuilder<E> builder) throws IOException Description copied from interface:FieldReadableReads a single field from the specified reader.- Specified by:
readFromin interfaceFieldReadable<E extends Enum<E>>- Parameters:
reader- a readerindex- the zero-based index, relative to this field set, of the field to be readtype- the wire type of the field to be readbuilder- the current value- Returns:
- the read value
- Throws:
IOException- if a field could not be read
-
writeTo
Description copied from interface:WritableWrites the specified object to the specified writer.
-