Skip to content

Commit

Permalink
Fix checkstyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hadleynet committed May 17, 2024
1 parent d10d07e commit bd4c558
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/org/mitre/synthea/export/rif/identifiers/HICN.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class HICN extends FixedLengthIdentifier {

private static final char[] START = {'T'};
private static final char[] END = {'A'};
private static final char[][] FAKE_HICN_FORMAT = {START, NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC,
NUMERIC, NUMERIC, NUMERIC, END};
private static final char[][] REAL_HICN_FORMAT = {NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC,
NUMERIC, NUMERIC, NUMERIC, END};
private static final char[][] FAKE_HICN_FORMAT = {START, NUMERIC, NUMERIC,
NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC, END};
private static final char[][] REAL_HICN_FORMAT = {NUMERIC, NUMERIC, NUMERIC,
NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC, NUMERIC, END};
public static final long MIN_HICN = 0;
public static final long MAX_FAKE_HICN = maxValue(FAKE_HICN_FORMAT);
public static final long MAX_REAL_HICN = maxValue(REAL_HICN_FORMAT);
Expand All @@ -30,6 +30,12 @@ public HICN(long value, boolean fake) {
this.fake = fake;
}

/**
* Parse a HICN from a string.
* @param str the string to parse
* @return the HICN
* @throws IllegalArgumentException if st isn't a valid HICN
*/
public static HICN parse(String str) {
if (str.charAt(0) == 'T' || str.charAt(0) == 't') {
return parse(str, true);
Expand All @@ -39,7 +45,8 @@ public static HICN parse(String str) {
}

private static HICN parse(String str, boolean fake) {
return new HICN(parse(str, fake ? FAKE_HICN_FORMAT : REAL_HICN_FORMAT), fake);
return new HICN(parse(str,
fake ? FAKE_HICN_FORMAT : REAL_HICN_FORMAT), fake);
}

@Override
Expand Down

0 comments on commit bd4c558

Please sign in to comment.