test_class.file: thai-widget/src/test/java/nectec/thai/identity/CitizenIdTest.java
test_class.identifier: CitizenIdTest
test_case.body: @Test public void getCheckDigit() {
          CitizenId cid;
          cid = new CitizenId("0000000000003");
          assertEquals("check digit should be 3", 3, cid.getCheckDigit());
          cid = new CitizenId("0000000000005");
          assertEquals("check digit should be 5", 5, cid.getCheckDigit());
          cid = new CitizenId("000000000000x");
          assertEquals("check digit should be -1", -1, cid.getCheckDigit());
      }
test_case.class_method_signature: CitizenIdTest.getCheckDigit()
test_case.full_signature: @Test public void getCheckDigit()
test_case.identifier: getCheckDigit
test_case.invocations: assertEquals getCheckDigit assertEquals getCheckDigit assertEquals getCheckDigit
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getCheckDigit()
focal_class.declarator: MULTIPLIER_TABLE = {13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2}
focal_class.modifier: private static final
focal_class.original_string: private static final int[] MULTIPLIER_TABLE = {13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2};
focal_class.type: int[]
focal_class.var_name: MULTIPLIER_TABLE
focal_class.declarator: LENGTH = 13
focal_class.modifier: private static final
focal_class.original_string: private static final int LENGTH = 13;
focal_class.type: int
focal_class.var_name: LENGTH
focal_class.declarator: id
focal_class.modifier: private final
focal_class.original_string: private final String id;
focal_class.type: String
focal_class.var_name: id
focal_class.declarator: printer = new IdPrettyPrinter() {
          @Override
          protected boolean positionToInsertSeparatorBefore(int position) {
              switch (position) {
                  case 1:
                  case 5:
                  case 10:
                  case 12:
                      return true;
              }
              return false;
          }
      }
focal_class.modifier: private final
focal_class.original_string: private final PrettyPrinter printer = new IdPrettyPrinter() {
          @Override
          protected boolean positionToInsertSeparatorBefore(int position) {
              switch (position) {
                  case 1:
                  case 5:
                  case 10:
                  case 12:
                      return true;
              }
              return false;
          }
      };
focal_class.type: PrettyPrinter
focal_class.var_name: printer
focal_class.file: thai-widget/src/main/java/nectec/thai/identity/CitizenId.java
focal_class.identifier: CitizenId
focal_class.interfaces: implements Identity
focal_class.class_method_signature: CitizenId.CitizenId(String id)
focal_class.full_signature: public  CitizenId(String id)
focal_class.identifier: CitizenId
focal_class.modifiers: public
focal_class.parameters: (String id)
focal_class.signature:  CitizenId(String id)
focal_class.class_method_signature: CitizenId.isValid(String id)
focal_class.full_signature: public static boolean isValid(String id)
focal_class.identifier: isValid
focal_class.modifiers: public static
focal_class.parameters: (String id)
focal_class.return: boolean
focal_class.signature: boolean isValid(String id)
focal_class.class_method_signature: CitizenId.validate()
focal_class.full_signature: @Override public boolean validate()
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean validate()
focal_class.class_method_signature: CitizenId.isValidFormat()
focal_class.full_signature: @Override public boolean isValidFormat()
focal_class.identifier: isValidFormat
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isValidFormat()
focal_class.class_method_signature: CitizenId.isRepeatNumber()
focal_class.full_signature: private boolean isRepeatNumber()
focal_class.identifier: isRepeatNumber
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRepeatNumber()
focal_class.class_method_signature: CitizenId.getCheckDigit()
focal_class.full_signature: protected int getCheckDigit()
focal_class.identifier: getCheckDigit
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getCheckDigit()
focal_class.class_method_signature: CitizenId.calculateCheckDigit()
focal_class.full_signature: protected int calculateCheckDigit()
focal_class.identifier: calculateCheckDigit
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int calculateCheckDigit()
focal_class.class_method_signature: CitizenId.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: CitizenId.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: CitizenId.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: CitizenId.prettyPrint()
focal_class.full_signature: @Override public String prettyPrint()
focal_class.identifier: prettyPrint
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String prettyPrint()
focal_class.class_method_signature: CitizenId.getId()
focal_class.full_signature: @Override public String getId()
focal_class.identifier: getId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getId()
focal_method.body: protected int getCheckDigit() {
          int lastIndex = CitizenId.LENGTH - 1;
          return Character.digit(id.charAt(lastIndex), 10);
      }
focal_method.class_method_signature: CitizenId.getCheckDigit()
focal_method.full_signature: protected int getCheckDigit()
focal_method.identifier: getCheckDigit
focal_method.invocations: digit charAt
focal_method.modifiers: protected
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int getCheckDigit()