【Java框架】CSFreamwork:网络节点

该类用于存储网络主机地址ip及port,将其抽象成一个节点。

package edu.xupt.cs.core;

public class NetNode {
     
    private String ip;
    private int port;

    public NetNode(String ip, int port) {
     
        this.ip = ip;
        this.port = port;
    }

    public String getIp() {
     
        return ip;
    }

    public void setIp(String ip) {
     
        this.ip = ip;
    }

    public int getPort() {
     
        return port;
    }

    public void setPort(int port) {
     
        this.port = port;
    }
}

你可能感兴趣的:(java)