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

cn.cheny.toolbox.other.IpAndPort Maven / Gradle / Ivy

There is a newer version: 2.3.6-jdk8
Show newest version
package cn.cheny.toolbox.other;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author by chenyi
 * @date 2021/11/24
 */
@Data
public class IpAndPort {

    private String ip;

    private int port;

    public IpAndPort(String ip, Integer port) {
        if (StringUtils.isEmpty(ip) || port == null) {
            throw new IllegalArgumentException("ip or port can not be null,ip:" + ip + ",port:" + port);
        }
        this.ip = ip;
        this.port = port;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy