Module org.refcodes.serial
Package org.refcodes.serial
Class AbstractArrayTransmission<ARRAY extends Transmission>
java.lang.Object
org.refcodes.serial.AbstractArrayTransmission<ARRAY>
- Type Parameters:
ARRAY- The type of the array elements to be contained in this instance.
- All Implemented Interfaces:
Serializable,org.refcodes.mixin.AliasAccessor,org.refcodes.mixin.ArrayAccessor<ARRAY[]>,org.refcodes.mixin.ArrayAccessor.ArrayBuilder<ARRAY[],,ArrayTransmission<ARRAY>> org.refcodes.mixin.ArrayAccessor.ArrayMutator<ARRAY[]>,org.refcodes.mixin.ArrayAccessor.ArrayProperty<ARRAY[]>,org.refcodes.mixin.LengthAccessor,org.refcodes.mixin.Resetable,org.refcodes.schema.Schemable,ArrayTransmission<ARRAY>,Transmission
- Direct Known Subclasses:
FixedSegmentArraySection,SegmentArraySection
public abstract class AbstractArrayTransmission<ARRAY extends Transmission>
extends Object
implements Transmission, ArrayTransmission<ARRAY>
An
AbstractArrayTransmission is a Transmission consisting of
Transmission elements (an array of elements).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.ArrayAccessor
org.refcodes.mixin.ArrayAccessor.ArrayBuilder<T extends Object,B extends org.refcodes.mixin.ArrayAccessor.ArrayBuilder<T, B>>, org.refcodes.mixin.ArrayAccessor.ArrayMutator<T extends Object>, org.refcodes.mixin.ArrayAccessor.ArrayProperty<T extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthPropertyNested classes/interfaces inherited from interface org.refcodes.serial.Transmission
Transmission.TransmissionMixin -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractArrayTransmission(ARRAY... aSegments) Constructs an according instance with the givenSegmentelements.AbstractArrayTransmission(Class<ARRAY> aSegmentClass) Constructs an according instance with instances of the array being created using the providedClassinstance.AbstractArrayTransmission(String aAlias, ARRAY... aSegments) Constructs an according instance with the givenSegmentelements.AbstractArrayTransmission(String aAlias, Class<ARRAY> aSegmentClass) Constructs an according instance with instances of the array being created using the providedClassinstance.AbstractArrayTransmission(String aAlias, Collection<ARRAY> aSegments) Constructs an according instance with the givenSegmentelements.AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory) Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, Collection<ARRAY> aSegments) Constructs an according instance with the given elements.AbstractArrayTransmission(Collection<ARRAY> aSegments) Constructs an according instance with the givenSegmentelements.AbstractArrayTransmission(org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory) Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.AbstractArrayTransmission(org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.AbstractArrayTransmission(org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, Collection<ARRAY> aSegments) Constructs an according instance with the given elements. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.refcodes.mixin.ArrayAccessor.ArrayProperty
letArrayMethods inherited from interface org.refcodes.serial.ArrayTransmission
toSequence, toSimpleTypeMapMethods inherited from interface org.refcodes.serial.Transmission
transmitTo, transmitTo, transmitTo
-
Field Details
-
_array
-
_sequenceableFactory
-
_alias
-
-
Constructor Details
-
AbstractArrayTransmission
Constructs an according instance with the givenSegmentelements.Segmentinstances for the array are created using the provided array's component type.- Parameters:
aSegments- The array containing the accordingSegmentelements.
-
AbstractArrayTransmission
Constructs an according instance with the givenSegmentelements.Segmentinstances for the array are created using the provided array's component type.- Parameters:
aSegments- The collection containing the accordingSegmentelements.
-
AbstractArrayTransmission
public AbstractArrayTransmission(org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.Segmentinstances for the array are created using the providedTypeFactoryinstance. -
AbstractArrayTransmission
public AbstractArrayTransmission(org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, Collection<ARRAY> aSegments) Constructs an according instance with the given elements.Segmentinstances for the array are created using the providedTypeFactoryinstance. -
AbstractArrayTransmission
Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.- Parameters:
aSegmentFactory- The factory producing the the fixed lengthSegmentelements.
-
AbstractArrayTransmission
Constructs an according instance with instances of the array being created using the providedClassinstance.- Parameters:
aSegmentClass- The class from which to produce the the fixed lengthSegmentelements.
-
AbstractArrayTransmission
Constructs an according instance with the givenSegmentelements.Segmentinstances for the array are created using the provided array's component type.- Parameters:
aAlias- The alias which identifies the content of this segment.aSegments- The array containing the accordingSegmentelements.
-
AbstractArrayTransmission
Constructs an according instance with the givenSegmentelements.Segmentinstances for the array are created using the provided array's component type.- Parameters:
aAlias- The alias which identifies the content of this segment.aSegments- The collection containing the accordingSegmentelements.
-
AbstractArrayTransmission
public AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.Segmentinstances for the array are created using the providedTypeFactoryinstance. -
AbstractArrayTransmission
public AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory, Collection<ARRAY> aSegments) Constructs an according instance with the given elements.Segmentinstances for the array are created using the providedTypeFactoryinstance. -
AbstractArrayTransmission
public AbstractArrayTransmission(String aAlias, org.refcodes.factory.TypeFactory<ARRAY> aSegmentFactory) Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.- Parameters:
aAlias- The alias which identifies the content of this segment.aSegmentFactory- The factory producing the the fixed lengthSegmentelements.
-
AbstractArrayTransmission
Constructs an according instance with instances of the array being created using the providedClassinstance.- Parameters:
aAlias- The alias which identifies the content of this segment.aSegmentClass- The class from which to produce the the fixed lengthSegmentelements.
-
-
Method Details
-
reset
public void reset()Resets any dynamic data (e.g. values such as payloads or checksums) and must not(!) reset any configurations or settings required to produce the dynamic data (e.g. theTransmissionMetrics).- Specified by:
resetin interfaceorg.refcodes.mixin.Resetable- Specified by:
resetin interfaceTransmission
-
toSchema
- Specified by:
toSchemain interfaceArrayTransmission<ARRAY extends Transmission>- Specified by:
toSchemain interfaceorg.refcodes.schema.Schemable- Specified by:
toSchemain interfaceTransmission
-
getLength
public int getLength()Determines the overall length of thisTransmission. In case of nestedTransmissioninstances, all length values from all sub-segments are accumulated to the result as well.- Specified by:
getLengthin interfaceArrayTransmission<ARRAY extends Transmission>- Specified by:
getLengthin interfaceorg.refcodes.mixin.LengthAccessor- Specified by:
getLengthin interfaceTransmission- Returns:
- The (overall) length of the
Transmission(including any sub-segments).
-
getArray
- Specified by:
getArrayin interfaceorg.refcodes.mixin.ArrayAccessor<ARRAY extends Transmission>
-
setArray
- Specified by:
setArrayin interfaceorg.refcodes.mixin.ArrayAccessor.ArrayMutator<ARRAY extends Transmission>
-
withArray
- Specified by:
withArrayin interfaceorg.refcodes.mixin.ArrayAccessor.ArrayBuilder<ARRAY extends Transmission[],ArrayTransmission<ARRAY extends Transmission>>
-
getAlias
- Specified by:
getAliasin interfaceorg.refcodes.mixin.AliasAccessor
-
toString
-