public class SocialSecurityNumber
extends java.lang.Object
Constructor and Description |
---|
SocialSecurityNumber(int ssn)
Constructor by numeric SSN.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFormattedSSN()
Get the formatted String representation of the SSN.
|
java.lang.String |
getMaskedSSN()
Get the masked representation of the SSN.
|
int |
getRawSSN()
Get the numeric representation of the SSN.
|
java.lang.String |
getStringSSN()
Get the String representation of the SSN.
|
boolean |
isValid()
Validates the provided SSN based in the "Over-The-Top Validation" in the article
"Validating Social Security Numbers through Regular Expressions" by Rion Williams.
|
java.lang.String |
toString() |
public SocialSecurityNumber(int ssn)
ssn
- The Social Secutiry Number.public boolean isValid()
public int getRawSSN()
public java.lang.String getStringSSN()
public java.lang.String getFormattedSSN()
public java.lang.String getMaskedSSN()
public java.lang.String toString()
toString
in class java.lang.Object