org.nd4j.linalg.primitives.Triple Maven / Gradle / Ivy
package org.nd4j.linalg.primitives;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* Simple triple elements holder implementation
* @author [email protected]
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Triple implements Serializable {
private static final long serialVersionUID = 119L;
protected F first;
protected S second;
protected T third;
public F getLeft() {
return first;
}
public S getMiddle() {
return second;
}
public T getRight() {
return third;
}
public static Triple tripleOf(F first, S second, T third) {
return new Triple<>(first, second, third);
}
public static Triple of(F first, S second, T third) {
return new Triple<>(first, second, third);
}
}