com.sinch.sdk.core.utils.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
package com.sinch.sdk.core.utils;
/**
* Utility class to manage a pair of information (tuple)
*
* @param Type of the left value
* @param Type of the right value
*/
public class Pair {
private final N left;
private final V right;
/**
* Create a new pair
*
* @param left The left (key) value for this pair
* @param right The right (value) value for this pair
*/
public Pair(N left, V right) {
this.left = left;
this.right = right;
}
/**
* Get the left value of this Pair
*
* @return Left value
*/
public N getLeft() {
return this.left;
}
/**
* Get the right value of this Pair
*
* @return Right value
*/
public V getRight() {
return this.right;
}
@Override
public String toString() {
return "Pair{" + "left='" + left + '\'' + ", right='" + right + '\'' + '}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy