public enum DurationMarshaller extends Enum<DurationMarshaller> implements FieldSetMarshaller<Duration,Duration>
Duration instances, using the following strategy:
Duration.ZERO as zero bytes| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Duration |
getBuilder()
Returns a builder for use with
FieldSetMarshaller.readField(ProtoStreamReader, int, Object). |
int |
getFields()
Returns the number of fields written by this marshaller.
|
Duration |
readField(ProtoStreamReader reader,
int index,
Duration duration)
Reads a single field from the specified reader at the specified index.
|
static DurationMarshaller |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DurationMarshaller[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeFields(ProtoStreamWriter writer,
int startIndex,
Duration duration)
Writes the set of fields from the specified object to the specified writer beginning at the specified index.
|
public static final DurationMarshaller INSTANCE
public static DurationMarshaller[] values()
for (DurationMarshaller c : DurationMarshaller.values()) System.out.println(c);
public static DurationMarshaller valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Duration getBuilder()
FieldSetMarshallerFieldSetMarshaller.readField(ProtoStreamReader, int, Object).
May return a shared instance, if the builder type is immutable, or a new instance, if the builder is mutable.getBuilder in interface FieldSetMarshaller<Duration,Duration>public int getFields()
FieldSetMarshallergetFields in interface FieldSetMarshaller<Duration,Duration>public Duration readField(ProtoStreamReader reader, int index, Duration duration) throws IOException
FieldSetMarshallerreadField in interface FieldSetMarshaller<Duration,Duration>reader - a ProtoStream readerindex - the field indexduration - the builder to be populated with the read fieldIOException - if the field could not be readpublic void writeFields(ProtoStreamWriter writer, int startIndex, Duration duration) throws IOException
FieldSetMarshallerwriteFields in interface FieldSetMarshaller<Duration,Duration>writer - a ProtoStream writerstartIndex - the start index for the embedded fieldsduration - the value to be writtenIOException - if the value could not be writtenCopyright © 2023 JBoss by Red Hat. All rights reserved.