Class PairCoder<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable

    @Internal
    public class PairCoder<K,​V>
    extends org.apache.beam.sdk.coders.CustomCoder<Pair<K,​V>>
    A coder for Pairs.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.beam.sdk.coders.Coder

        org.apache.beam.sdk.coders.Coder.Context, org.apache.beam.sdk.coders.Coder.NonDeterministicException
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Pair<K,​V> decode​(java.io.InputStream inStream)  
      static <K,​V>
      org.apache.beam.sdk.values.TypeDescriptor<Pair<K,​V>>
      descriptor​(org.apache.beam.sdk.values.TypeDescriptor<K> key, org.apache.beam.sdk.values.TypeDescriptor<V> value)  
      void encode​(Pair<K,​V> value, java.io.OutputStream outStream)  
      boolean equals​(java.lang.Object obj)  
      org.apache.beam.sdk.values.TypeDescriptor<Pair<K,​V>> getEncodedTypeDescriptor()  
      int hashCode()  
      static <K,​V>
      PairCoder<K,​V>
      of​(org.apache.beam.sdk.coders.Coder<K> keyCoder, org.apache.beam.sdk.coders.Coder<V> valueCoder)  
      void verifyDeterministic()  
      • Methods inherited from class org.apache.beam.sdk.coders.CustomCoder

        getCoderArguments
      • Methods inherited from class org.apache.beam.sdk.coders.Coder

        consistentWithEquals, decode, encode, getEncodedElementByteSize, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static <K,​V> PairCoder<K,​V> of​(org.apache.beam.sdk.coders.Coder<K> keyCoder,
                                                          org.apache.beam.sdk.coders.Coder<V> valueCoder)
      • descriptor

        public static <K,​V> org.apache.beam.sdk.values.TypeDescriptor<Pair<K,​V>> descriptor​(org.apache.beam.sdk.values.TypeDescriptor<K> key,
                                                                                                        org.apache.beam.sdk.values.TypeDescriptor<V> value)
      • encode

        public void encode​(Pair<K,​V> value,
                           java.io.OutputStream outStream)
                    throws java.io.IOException
        Specified by:
        encode in class org.apache.beam.sdk.coders.Coder<Pair<K,​V>>
        Throws:
        java.io.IOException
      • decode

        public Pair<K,​V> decode​(java.io.InputStream inStream)
                               throws java.io.IOException
        Specified by:
        decode in class org.apache.beam.sdk.coders.Coder<Pair<K,​V>>
        Throws:
        java.io.IOException
      • getEncodedTypeDescriptor

        public org.apache.beam.sdk.values.TypeDescriptor<Pair<K,​V>> getEncodedTypeDescriptor()
        Overrides:
        getEncodedTypeDescriptor in class org.apache.beam.sdk.coders.Coder<Pair<K,​V>>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • verifyDeterministic

        public void verifyDeterministic()
        Overrides:
        verifyDeterministic in class org.apache.beam.sdk.coders.CustomCoder<Pair<K,​V>>