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, AliasAccessor, ArrayAccessor<ARRAY[]>, ArrayAccessor.ArrayBuilder<ARRAY[], ArrayTransmission<ARRAY>>, ArrayAccessor.ArrayMutator<ARRAY[]>, ArrayAccessor.ArrayProperty<ARRAY[]>, LengthAccessor, Resetable, Diagnosable, Schemable<DiagnosticOptions>, 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 AliasAccessor
AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface ArrayAccessor
ArrayAccessor.ArrayBuilder<T,B>, ArrayAccessor.ArrayMutator<T>, ArrayAccessor.ArrayProperty<T> Nested classes/interfaces inherited from interface LengthAccessor
LengthAccessor.LengthBuilder<B>, LengthAccessor.LengthMutator, LengthAccessor.LengthPropertyNested classes/interfaces inherited from interface 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, TypeFactory<ARRAY> aSegmentFactory) Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.AbstractArrayTransmission(String aAlias, TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.AbstractArrayTransmission(String aAlias, 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(TypeFactory<ARRAY> aSegmentFactory) Constructs an according instance with instances of the array being created using the providedTypeFactoryinstance.AbstractArrayTransmission(TypeFactory<ARRAY> aSegmentFactory, ARRAY... aSegments) Constructs an according instance with the given elements.AbstractArrayTransmission(TypeFactory<ARRAY> aSegmentFactory, Collection<ARRAY> aSegments) Constructs an according instance with the given elements. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ArrayAccessor.ArrayProperty
letArrayMethods inherited from interface ArrayTransmission
toSequence, toSimpleTypeTableMethods inherited from interface Transmission
transmitTo, transmitTo, transmitTo
-
Field Details
-
_array
-
_sequenceableFactory
-
_alias
-
-
Constructor Details
-
AbstractArrayTransmission
-
AbstractArrayTransmission
-
AbstractArrayTransmission
Constructs an according instance with the given elements.Segmentinstances for the array are created using the providedTypeFactoryinstance. -
AbstractArrayTransmission
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
-
AbstractArrayTransmission
-
AbstractArrayTransmission
-
AbstractArrayTransmission
public AbstractArrayTransmission(String aAlias, 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, 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:
aAlias- The alias which identifies the content of this segment.aSegmentFactory- The factory producing the the fixed lengthSegmentelements.
-
AbstractArrayTransmission
-
-
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 interfaceResetable- Specified by:
resetin interfaceTransmission
-
toSchema
- Specified by:
toSchemain interfaceArrayTransmission<ARRAY extends Transmission>- Specified by:
toSchemain interfaceSchemable<ARRAY extends Transmission>
-
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 interfaceLengthAccessor- Specified by:
getLengthin interfaceTransmission- Returns:
- The (overall) length of the
Transmission(including any sub-segments).
-
getArray
- Specified by:
getArrayin interfaceArrayAccessor<ARRAY extends Transmission>
-
setArray
- Specified by:
setArrayin interfaceArrayAccessor.ArrayMutator<ARRAY extends Transmission>
-
withArray
- Specified by:
withArrayin interfaceArrayAccessor.ArrayBuilder<ARRAY extends Transmission[], ArrayTransmission<ARRAY extends Transmission>>
-
getAlias
- Specified by:
getAliasin interfaceAliasAccessor
-
toString
-