All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jinq.tuples.Tuple5 Maven / Gradle / Ivy

Go to download

Jinq public API for extending Java 8 streams with database functionality

There is a newer version: 2.0.2
Show newest version
package org.jinq.tuples;

public class Tuple5 extends Tuple
{
   final A one;
   final B two;
   final C three;
   final D four;
   final E five;
   
   public A getOne() { return one; }
   public B getTwo() { return two; }
   public C getThree() { return three; }
   public D getFour() { return four; }
   public E getFive() { return five; }
   
   public Tuple5(A one, B two, C three, D four, E five)
   {
      this.one = one;
      this.two = two;
      this.three = three;
      this.four = four;
      this.five = five;
   }
   
   @Override
   public String toString()
   {
      return "Tuple3(" + getOne() + "," + getTwo() + "," + getThree() + "," + getFour() + "," + getFive() + ")";
   }

   
   public boolean equals(Object obj)
   {
      if ( this == obj) return true;
      
      if (! (obj instanceof Tuple5)) return false;
      
      Tuple5 tuple = (Tuple5)obj;
      
      return this.one.equals(tuple.one)
         && this.two.equals(tuple.two)
         && this.three.equals(tuple.three)
         && this.four.equals(tuple.four)
         && this.five.equals(tuple.five);
   }
   
   public int hashCode()
   {
      return one.hashCode() + two.hashCode() + three.hashCode() + four.hashCode()
         + five.hashCode();
   }
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy