Class Triple<E,F,G>

java.lang.Object
org.tweetyproject.commons.util.Triple<E,F,G>
Type Parameters:
E - the type of the first element
F - the type of the second element
G - the type of the third element

public class Triple<E,F,G> extends Object
This class implements a simple triple of elements.
Author:
Matthias Thimm
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes an empty triple.
    Triple(E obj1, F obj2, G obj3)
    Initializes the elements of this triple with the given parameters
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    returns the first element of this triple
    returns the second element of this triple
    returns the third element of this triple
    int
     
    void
    setFirst(E obj1)
    sets the first element of this triple
    void
    setSecond(F obj2)
    sets the second element of this triple
    void
    setThird(G obj3)
    sets the third element of this triple

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Triple

      public Triple(E obj1, F obj2, G obj3)
      Initializes the elements of this triple with the given parameters
      Parameters:
      obj1 - the first element of this triple
      obj2 - the second element of this triple
      obj3 - the third element of this triple
    • Triple

      public Triple()
      Initializes an empty triple.
  • Method Details

    • getFirst

      public E getFirst()
      returns the first element of this triple
      Returns:
      the first element of this triple
    • setFirst

      public void setFirst(E obj1)
      sets the first element of this triple
      Parameters:
      obj1 - an object of type E
    • getSecond

      public F getSecond()
      returns the second element of this triple
      Returns:
      the second element of this triple
    • setSecond

      public void setSecond(F obj2)
      sets the second element of this triple
      Parameters:
      obj2 - an object of type F
    • getThird

      public G getThird()
      returns the third element of this triple
      Returns:
      the third element of this triple
    • setThird

      public void setThird(G obj3)
      sets the third element of this triple
      Parameters:
      obj3 - an object of type G
    • hashCode

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

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