Datasets:
ArXiv:
License:
Download data/train/CDZR0/BattleShip/src/battleship/Networking/ServerAddress.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 733 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/CDZR0/BattleShip/src/battleship/Networking/ServerAddress.java
- Command line
-
hf download hf://datasets/RepoFusion/Stack-Repo/data/train/CDZR0/BattleShip/src/battleship/Networking/ServerAddress.java
-
curl -L -o ServerAddress.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/CDZR0/BattleShip/src/battleship/Networking/ServerAddress.java
733 Bytes
| package battleship.Networking; | |
| public class ServerAddress { | |
| String name; | |
| String ip; | |
| int port; | |
| public ServerAddress(String name, String ip, int port) { | |
| this.name = name; | |
| this.ip = ip; | |
| this.port = port; | |
| } | |
| public String toString() | |
| { | |
| return name + "$ " + ip + "$" + port; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public String getIP() { | |
| return ip; | |
| } | |
| public int getPort() { | |
| return port; | |
| } | |
| public void setName(String name){ | |
| this.name = name; | |
| } | |
| public void setIP(String ip) { | |
| this.ip = ip; | |
| } | |
| public void setPort(int port) { | |
| this.port = port; | |
| } | |
| } | |