com.softicar.platform.common.container.tuple.Tuple1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
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();
}
}
}