Class Couple<A,B>

java.lang.Object
com.pnfsoftware.jeb.util.base.Couple<A,B>
Type Parameters:
A - the first element
B - the second element

@Ser public class Couple<A,B> extends Object
Handy class holding two typed elements. Null values are allowed.
See Also:
  • Constructor Details

    • Couple

      public Couple(A a, B b)
  • Method Details

    • getFirst

      public A getFirst()
    • setFirst

      public void setFirst(A a)
    • getSecond

      public B getSecond()
    • setSecond

      public void setSecond(B b)
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFirstElements

      public static <A, B> Collection<A> getFirstElements(Collection<Couple<A,B>> couples)
    • getSecondElements

      public static <A, B> Collection<B> getSecondElements(Collection<Couple<A,B>> couples)