Skip to content

Commit 2b3aa7b

Browse files
committed
email name parser: an enum value in EmailAddressNameType was renamed previously, this code was outdated.
1 parent b334a2a commit 2b3aa7b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
package org.nameapi.client.services.email.emailnameparser;
22

33
/**
4+
* What kind of name string it is.
45
*/
56
public enum EmailAddressNameType {
7+
8+
/**
9+
* It's a regular name, like "Peter" or "Johnson".
10+
*/
611
NAME,
7-
ABBREVIATION
12+
13+
/**
14+
* It's an abbreviated name with an initial like "P".
15+
* The string does not end with a dot.
16+
*/
17+
INITIAL;
18+
19+
20+
/**
21+
* Developer: Call this before doing a switch on an enum value.
22+
*/
23+
public static void assertSize(int expectedItems) {
24+
assert values().length == expectedItems : "Update the code calling this with " + expectedItems + "!";
25+
}
26+
827
}

0 commit comments

Comments
 (0)