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

net.sf.gluebooster.java.booster.basic.container.Tuple Maven / Gradle / Ivy

package net.sf.gluebooster.java.booster.basic.container;

/**
 * Multiple elements.
 * 
 * Add more elements if necessary
 * 
 * @author CBauer
 * 
 * @param 
 * @param 
 * @param 
 */
public class Tuple {

	/**
	 * The first element.
	 */
	private First first;
	
	/**
	 * The second element.
	 */
	private Second second;
	
	/**
	 * The third element.
	 */
	private Third third;

	/**
	 * The fourth element.
	 */
	private Fourth fourth;

	public final First getFirst() {
		return first;
	}

	public final void setFirst(First first) {
		this.first = first;
	}

	public final Second getSecond() {
		return second;
	}

	public final void setSecond(Second second) {
		this.second = second;
	}

	public final Third getThird() {
		return third;
	}

	public final void setThird(Third third) {
		this.third = third;
	}

	public Tuple() {

	}

	public Tuple(First first, Second second, Third third) {
		this.first = first;
		this.second = second;
		this.third = third;
	}

	public Tuple(First first, Second second, Third third, Fourth fourth) {
		super();
		this.first = first;
		this.second = second;
		this.third = third;
		this.fourth = fourth;
	}

	/**
	 * Create a triple
	 * 
	 * @return (first, second, third)
	 */
	public static  Tuple triple(First first, Second second, Third third) {
		return new Tuple(first, second, third);
	}

	@Override
	public String toString() {
		return "[" + first + ", " + second + ", " + third + "]";
	}

	public Fourth getFourth() {
		return fourth;
	}

	public void setFourth(Fourth fourth) {
		this.fourth = fourth;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy