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

com.softicar.platform.common.container.tuple.Tuple1 Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.container.tuple;

public final class Tuple1 extends AbstractTuple {

	private T0 element0;

	public Tuple1(T0 e0) {

		this.element0 = e0;
	}

	public  Tuple2 plus(T1 element) {

		return new Tuple2<>(element0, element);
	}

	@Override
	public int size() {

		return 1;
	}

	public Tuple0 subTuple0() {

		return new Tuple0();
	}

	public T0 get0() {

		return element0;
	}

	public void set0(T0 value) {

		this.element0 = value;
	}

	@Override
	protected Object getElement(int index) {

		switch (index) {
		case 0:
			return element0;
		default:
			throw new IndexOutOfBoundsException();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy