Serializable
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.LengthAccessor
, org.refcodes.mixin.PayloadAccessor<Float>
, org.refcodes.mixin.PayloadAccessor.PayloadBuilder<T,PayloadTransmission<T>>
, org.refcodes.mixin.PayloadAccessor.PayloadMutator<Float>
, org.refcodes.mixin.PayloadAccessor.PayloadProperty<Float>
, PayloadSegment<Float>
, PayloadTransmission<Float>
, Segment
, Segment.SegmentMixin
, Transmission
, Transmission.TransmissionMixin
public class FloatSegment extends AbstractPayloadSegment<Float> implements Segment
FloatSegment
is an implementation of a Segment
carrying
in float value as 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 |
---|---|---|
static int |
BYTES |
|
static String |
ENDIANESS |
_alias, _payload
Constructor | Description |
---|---|
FloatSegment() |
Constructs an empty
FloatSegment with a
TransmissionMetrics.DEFAULT_ENDIANESS endian representation of
the FloatSegment 's value. |
FloatSegment(Float aValue) |
Constructs a
FloatSegment with the given float value (payload)
and a TransmissionMetrics.DEFAULT_ENDIANESS endian representation
of the FloatSegment 's value. |
FloatSegment(Float aValue,
org.refcodes.numerical.Endianess aEndianess) |
Constructs a
FloatSegment with the given float value (payload)
and the given Endianess for the representation of the
FloatSegment 's value. |
FloatSegment(Float aValue,
TransmissionMetrics aTransmissionMetrics) |
Constructs an according instance from the given configuration.
|
FloatSegment(String aAlias) |
Constructs an empty
FloatSegment with a
TransmissionMetrics.DEFAULT_ENDIANESS endian representation of
the FloatSegment 's value. |
FloatSegment(String aAlias,
Float aValue) |
Constructs a
FloatSegment with the given float value (payload)
and a TransmissionMetrics.DEFAULT_ENDIANESS endian representation
of the FloatSegment 's value. |
FloatSegment(String aAlias,
Float aValue,
org.refcodes.numerical.Endianess aEndianess) |
Constructs a
FloatSegment with the given float value (payload)
and the given Endianess for the representation of the
FloatSegment 's value. |
FloatSegment(String aAlias,
Float aValue,
TransmissionMetrics aTransmissionMetrics) |
Constructs an according instance from the given configuration.
|
FloatSegment(String aAlias,
org.refcodes.numerical.Endianess aEndianess) |
Constructs an empty
FloatSegment with the given
Endianess . |
FloatSegment(String aAlias,
TransmissionMetrics aTransmissionMetrics) |
Constructs an according instance from the given configuration.
|
FloatSegment(org.refcodes.numerical.Endianess aEndianess) |
Constructs an empty
FloatSegment with the given
Endianess . |
FloatSegment(TransmissionMetrics aTransmissionMetrics) |
Constructs an according instance from the given configuration.
|
Modifier and Type | Method | Description |
---|---|---|
int |
fromTransmission(Sequence aSequence,
int aOffset) |
(Re-)initializes this instance with the the given
Sequence data. |
int |
getLength() |
Determines the overall length of this
Transmission . |
Schema |
toSchema() |
Retrieves the
Schema representing the Transmission . |
Sequence |
toTransmission() |
Provides the
Sequence representation of this
Transmission . |
FloatSegment |
withPayload(Float aValue) |
equals, getAlias, getPayload, hashCode, setPayload, toSimpleTypeMap, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromTransmission, fromTransmission, fromTransmission, receiveFrom, receiveFrom, receiveFrom
receiveFrom
fromInputStream, toSimpleTypeMap, transmitTo, transmitTo, transmitTo
transmitTo
public static final String ENDIANESS
public static final int BYTES
public FloatSegment(TransmissionMetrics aTransmissionMetrics)
TransmissionMetrics
configuration object, though only those attributes are supported which
are also supported by the other constructors!aTransmissionMetrics
- The TransmissionMetrics
to be used
for configuring this instance.public FloatSegment(Float aValue, TransmissionMetrics aTransmissionMetrics)
TransmissionMetrics
configuration object, though only those attributes are supported which
are also supported by the other constructors!aValue
- The payload to be contained by the
DoubleArraySection
.aTransmissionMetrics
- The TransmissionMetrics
to be used
for configuring this instance.public FloatSegment(String aAlias, TransmissionMetrics aTransmissionMetrics)
TransmissionMetrics
configuration object, though only those attributes are supported which
are also supported by the other constructors!aAlias
- The alias which identifies the content of this instance.aTransmissionMetrics
- The TransmissionMetrics
to be used
for configuring this instance.public FloatSegment(String aAlias, Float aValue, TransmissionMetrics aTransmissionMetrics)
TransmissionMetrics
configuration object, though only those attributes are supported which
are also supported by the other constructors!aAlias
- The alias which identifies the content of this instance.aValue
- The payload to be contained by the
DoubleArraySection
.aTransmissionMetrics
- The TransmissionMetrics
to be used
for configuring this instance.public FloatSegment()
FloatSegment
with a
TransmissionMetrics.DEFAULT_ENDIANESS
endian representation of
the FloatSegment
's value.public FloatSegment(org.refcodes.numerical.Endianess aEndianess)
FloatSegment
with the given
Endianess
.aEndianess
- The Endianess
to be used for payload values.public FloatSegment(Float aValue)
FloatSegment
with the given float value (payload)
and a TransmissionMetrics.DEFAULT_ENDIANESS
endian representation
of the FloatSegment
's value.aValue
- The value (payload) to be contained by the
FloatSegment
.public FloatSegment(Float aValue, org.refcodes.numerical.Endianess aEndianess)
FloatSegment
with the given float value (payload)
and the given Endianess
for the representation of the
FloatSegment
's value.aValue
- The value (payload) to be contained by the
FloatSegment
.aEndianess
- The Endianess
to be used for payload values.public FloatSegment(String aAlias)
FloatSegment
with a
TransmissionMetrics.DEFAULT_ENDIANESS
endian representation of
the FloatSegment
's value.aAlias
- The alias which identifies the content of this segment.public FloatSegment(String aAlias, org.refcodes.numerical.Endianess aEndianess)
FloatSegment
with the given
Endianess
.aAlias
- The alias which identifies the content of this segment.aEndianess
- The Endianess
to be used for payload values.public FloatSegment(String aAlias, Float aValue)
FloatSegment
with the given float value (payload)
and a TransmissionMetrics.DEFAULT_ENDIANESS
endian representation
of the FloatSegment
's value.aAlias
- The alias which identifies the content of this segment.aValue
- The value (payload) to be contained by the
FloatSegment
.public FloatSegment(String aAlias, Float aValue, org.refcodes.numerical.Endianess aEndianess)
FloatSegment
with the given float value (payload)
and the given Endianess
for the representation of the
FloatSegment
's value.aAlias
- The alias which identifies the content of this segment.aValue
- The value (payload) to be contained by the
FloatSegment
.aEndianess
- The Endianess
to be used for payload values.public Sequence toTransmission()
Sequence
representation of this
Transmission
. In case of nested Transmission
instances,
all Sequence
representations from all sub-segments are
accumulated to the result as well.toTransmission
in interface Transmission
Sequence
.public int fromTransmission(Sequence aSequence, int aOffset) throws TransmissionException
Sequence
data.fromTransmission
in interface Segment
aSequence
- The Sequence
data from which to (re-)initialize
this instance.aOffset
- The offset where to start processing the provided
Sequence
.Sequence
processed by this method.TransmissionException
- thrown in case a given Sequence
cannot be processed.public int getLength()
Transmission
. In case of
nested Transmission
instances, all length values from all
sub-segments are accumulated to the result as well.getLength
in interface org.refcodes.mixin.LengthAccessor
getLength
in interface Transmission
Transmission
(including any
sub-segments).public Schema toSchema()
Schema
representing the Transmission
.
Retrieving a Schema
is useful when analyzing and debugging data
structures such as a AllocSectionDecoratorSegment
instance to help
document, learn and verify on the structure (as well as the content) of
that very AllocSectionDecoratorSegment
.toSchema
in interface Transmission
Schema
representation of the implementing type for
debugging and verification (or documentation) purposes.public FloatSegment withPayload(Float aValue)
withPayload
in interface org.refcodes.mixin.PayloadAccessor.PayloadBuilder<T,PayloadTransmission<T>>
Copyright © 2021. All rights reserved.