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

top.openyuan.jpa.specification.handler.bean.Pair Maven / Gradle / Ivy

package top.openyuan.jpa.specification.handler.bean;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 二元组实体类.
 *
 * @author lzy
 * @since v1.0.0
 */
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class Pair {

    /**
     * 左边的元素.
     */
    private final L left;

    /**
     * 右边的元素.
     */
    private final R right;

    /**
     * 构造二元组 {@link Pair} 的实例.
     *
     * @param left 左边的元素
     * @param right 第二个元素
     * @param  左边的元素的类型
     * @param  右边的元素的类型
     * @return {@link Pair} 的实例
     */
    public static  Pair of(L left, R right) {
        return new Pair<>(left, right);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy