T
- The type of the segment's payload.Serializable
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.LengthAccessor
, org.refcodes.mixin.PayloadAccessor<T>
, org.refcodes.mixin.PayloadAccessor.PayloadBuilder<T,PayloadTransmission<T>>
, org.refcodes.mixin.PayloadAccessor.PayloadMutator<T>
, org.refcodes.mixin.PayloadAccessor.PayloadProperty<T>
, PayloadSegment<T>
, PayloadTransmission<T>
, Segment
, Segment.SegmentMixin
, Transmission
, Transmission.TransmissionMixin
AsciizArraySegment
, AsciizSegment
, BooleanSegment
, ByteSegment
, DoubleSegment
, FloatSegment
, IntSegment
, LongSegment
, NumberSegment
, ShortSegment
public abstract class AbstractPayloadSegment<T> extends Object implements PayloadSegment<T>, Segment.SegmentMixin
Segment
with payload.org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P extends Object,B extends org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P,B>>, org.refcodes.mixin.PayloadAccessor.PayloadMutator<P extends Object>, org.refcodes.mixin.PayloadAccessor.PayloadProperty<P extends Object>
Segment.SegmentMixin
Transmission.TransmissionMixin
Modifier and Type | Field | Description |
---|---|---|
protected String |
_alias |
|
protected T |
_payload |
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractPayloadSegment() |
Empty constructor fur sub-classes.
|
|
AbstractPayloadSegment(String aAlias) |
Constructs an empty
Segment to be initialized via
Segment.fromTransmission(Sequence) or
Segment.fromTransmission(Sequence, int) . |
|
AbstractPayloadSegment(String aAlias,
T aValue) |
Constructs a
Segment instance with the given value. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object obj) |
|
String |
getAlias() |
|
T |
getPayload() |
|
int |
hashCode() |
|
void |
setPayload(T aValue) |
|
org.refcodes.struct.SimpleTypeMap |
toSimpleTypeMap() |
Returns the
SimpleTypeMap representation of this
Transmission . |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromTransmission, fromTransmission, fromTransmission, fromTransmission, receiveFrom, receiveFrom
receiveFrom
fromInputStream, getLength, toSchema, toTransmission, transmitTo, transmitTo
transmitTo
protected AbstractPayloadSegment()
public AbstractPayloadSegment(String aAlias)
Segment
to be initialized via
Segment.fromTransmission(Sequence)
or
Segment.fromTransmission(Sequence, int)
.aAlias
- The alias which identifies the content of this segment.public void setPayload(T aValue)
setPayload
in interface org.refcodes.mixin.PayloadAccessor.PayloadMutator<T>
public T getPayload()
getPayload
in interface org.refcodes.mixin.PayloadAccessor<T>
public String getAlias()
getAlias
in interface org.refcodes.mixin.AliasAccessor
public org.refcodes.struct.SimpleTypeMap toSimpleTypeMap()
SimpleTypeMap
representation of this
Transmission
. In case this Transmission has Transmission
children, then the children are queried as well and contained in the
resulting SimpleTypeMap
. The aliases of the according
Transmission
instances represent the resulting path to a
Transmission
's final simple type.toSimpleTypeMap
in interface Transmission
SimpleTypeMap
representing this Transmission
and (if any) its children, with the according aliases forming the
paths to the Transmission
's values.Copyright © 2021. All rights reserved.