Package jadex.commons

Class Tuple2<T,​E>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Tuple2<T,​E>
    extends Tuple
    Generic version of tuple for two elements.
    See Also:
    Serialized Form
    • Constructor Detail

      • Tuple2

        public Tuple2​(T entity1,
                      E entity2)
        Convenience constructor for binary tuples.
        Parameters:
        entity1 - The first object in the tuple.
        entity2 - The second object in the tuple.
    • Method Detail

      • getFirstEntity

        public T getFirstEntity()
        Get the first entity.
        Returns:
        The first entity.
      • getSecondEntity

        public E getSecondEntity()
        Get the second entity.
        Returns:
        The second entity.
      • clone

        public java.lang.Object clone()
        Clone this tuple.
        Overrides:
        clone in class Tuple
        Returns:
        A shallow copy of this tuple.