Class Pair<X,​Y>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificData.SchemaConstructable

    public class Pair<X,​Y>
    extends java.lang.Object
    implements org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificData.SchemaConstructable, java.io.Serializable
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      X first()  
      java.lang.Object get​(int i)  
      org.apache.avro.Schema getSchema()  
      int hashCode()  
      static <X,​Y>
      Pair<X,​Y>
      of​(X first, Y second)  
      void put​(int i, java.lang.Object v)  
      Y second()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • of

        public static <X,​Y> Pair<X,​Y> of​(X first,
                                                     Y second)
      • put

        public void put​(int i,
                        java.lang.Object v)
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
      • get

        public java.lang.Object get​(int i)
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
      • getSchema

        public org.apache.avro.Schema getSchema()
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
      • first

        public X first()
      • second

        public Y second()
      • toString

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

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object