![JAR search and dependency download from the Maven repository](/logo.png)
com.tukeof.common.core.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-core Show documentation
Show all versions of common-core Show documentation
a common and useful pure java library
The newest version!
package com.tukeof.common.core;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class Pair {
private T1 first;
private T2 second;
public T1 first() {
return first;
}
public T2 second() {
return second;
}
public Pair reverse() {
return new Pair<>(second, first);
}
@Override
public String toString() {
return String.format("(%s, %s)",
first().toString(), second().toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy