Class PairEncoderFactory<A extends,​B extends>

  • Type Parameters:
    A - type for the left coder.
    B - type for the right coder.
    All Implemented Interfaces:, EncoderFactory<Pair<A,​B>>

    public final class PairEncoderFactory<A extends,​B extends>
    extends java.lang.Object
    implements EncoderFactory<Pair<A,​B>>
    An EncoderFactory for Pair. Reference: KvCoder in BEAM.
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static <A extends,​B extends> PairEncoderFactory<A,​B> of​(EncoderFactory<A> leftEncoderFactory,
                                                                                                                             EncoderFactory<B> rightEncoderFactory)
        static initializer of the class.
        Type Parameters:
        A - type of the left element.
        B - type of the right element.
        leftEncoderFactory - left coder.
        rightEncoderFactory - right coder.
        the new PairEncoderFactory.
      • create

        public EncoderFactory.Encoder<Pair<A,​B>> create​( outputStream)
        Description copied from interface: EncoderFactory
        Get an encoder instance.
        Specified by:
        create in interface EncoderFactory<A extends>
        outputStream - the stream on which encoded bytes are written
        the encoder instance.
        Throws: - if fail to get the instance.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object