Class AbstractTransmissionDecorator<DECORATEE extends Transmission>

java.lang.Object
org.refcodes.serial.AbstractTransmissionDecorator<DECORATEE>
Type Parameters:
DECORATEE - The Transmission type describing the Transmission subclass to be enriched.
All Implemented Interfaces:
Serializable, org.refcodes.mixin.DecorateeAccessor<DECORATEE>, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Schemable, Transmission, Transmission.TransmissionMixin
Direct Known Subclasses:
AbstractCipherTransmissionDecorator, AbstractInvertibleTransmissionDecorator, AbstractSectionDecorator, AbstractSegmentDecorator, AllocSegmentBody, BreakerSectionDecorator, BreakerSegmentDecorator

public abstract class AbstractTransmissionDecorator<DECORATEE extends Transmission> extends Object implements Transmission, Transmission.TransmissionMixin, org.refcodes.mixin.DecorateeAccessor<DECORATEE>
An abstract implementation of a Transmission decorating another Transmission.
See Also:
  • Field Details

  • Constructor Details

    • AbstractTransmissionDecorator

      protected AbstractTransmissionDecorator()
      Constructs an empty DecoratorSegment.
    • AbstractTransmissionDecorator

      public AbstractTransmissionDecorator(DECORATEE aDecoratee)
      Constructs a DecoratorSegment instance with the given decoratee.
      Parameters:
      aDecoratee - The decoratee to be contained by this facade.
  • Method Details

    • getLength

      public int getLength()
      Determines the overall length of this Transmission. In case of nested Transmission instances, all length values from all sub-segments are accumulated to the result as well.
      Specified by:
      getLength in interface org.refcodes.mixin.LengthAccessor
      Specified by:
      getLength in interface Transmission
      Returns:
      The (overall) length of the Transmission (including any sub-segments).
    • toSequence

      public Sequence toSequence()
      Provides the 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. Caution, the Transmission (or its nested Transmission instances) may be backed by the returned Sequence.
      Specified by:
      toSequence in interface Transmission
      Returns:
      The according instance's Sequence.
    • getDecoratee

      public DECORATEE getDecoratee()
      Specified by:
      getDecoratee in interface org.refcodes.mixin.DecorateeAccessor<DECORATEE extends Transmission>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toSimpleTypeMap

      public org.refcodes.struct.SimpleTypeMap toSimpleTypeMap()
      Returns the 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.
      Specified by:
      toSimpleTypeMap in interface Transmission
      Returns:
      The SimpleTypeMap representing this Transmission and (if any) its children, with the according aliases forming the paths to the Transmission's values.