com.tinkerpop.pipes.util.structures.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipes Show documentation
Show all versions of pipes Show documentation
Pipes is a dataflow framework written in Java that enables the splitting, merging, filtering, and
transformation of data from input to output.
Computations are expressed using a combinator model and are evaluated in a memory-efficient, lazy fashion.
package com.tinkerpop.pipes.util.structures;
/**
* A pair of objects.
*
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class Pair {
private final A a;
private final B b;
public Pair(final A a, final B b) {
this.a = a;
this.b = b;
}
public A getA() {
return a;
}
public B getB() {
return b;
}
public boolean equals(Object object) {
return (object.getClass().equals(Pair.class) && ((Pair) object).getA().equals(this.a) && ((Pair) object).getB().equals(this.b));
}
}