summaryrefslogtreecommitdiffstats
path: root/src/main/java/derms/replica/replica2/City.java
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-11-28 17:26:19 -0500
committerSam Anthony <sam@samanthony.xyz>2024-11-28 17:26:19 -0500
commit6654546671eea9f9becd32b3160a134802659cbc (patch)
treecefc60b322c4d2a2849bbec83682f379965ab48c /src/main/java/derms/replica/replica2/City.java
parentf3d0bfd50bdde4f96dc8ee603a7093d68201f114 (diff)
downloadsoen423-6654546671eea9f9becd32b3160a134802659cbc.zip
Replica2: restrict scope
Diffstat (limited to 'src/main/java/derms/replica/replica2/City.java')
-rw-r--r--src/main/java/derms/replica/replica2/City.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/derms/replica/replica2/City.java b/src/main/java/derms/replica/replica2/City.java
index b027d44..63aa2cd 100644
--- a/src/main/java/derms/replica/replica2/City.java
+++ b/src/main/java/derms/replica/replica2/City.java
@@ -2,18 +2,18 @@ package derms.replica.replica2;
import java.io.Serializable;
-public class City implements Serializable {
- public static final int codeLen = 3;
+class City implements Serializable {
+ static final int codeLen = 3;
private String code;
- public City(String code) throws IllegalArgumentException {
+ City(String code) throws IllegalArgumentException {
if (code.length() != codeLen)
throw new IllegalArgumentException("Invalid city: "+code+"; must be "+codeLen+" letters");
this.code = code;
}
- public City() {
+ City() {
this("XXX");
}