code039.java
package pack01;
import java.io.Serializable;
public class code039 implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
private String mailAddress;
private boolean isEmail;
public code039()
{
}
public code039(String mailAddress)
{
this.mailAddress = mailAddress;
}
public boolean checkEmail()
{
String regex = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
if (mailAddress.matches(regex))
{
this.isEmail = true; //������
}
return isEmail;
}
public String getMailAddress()
{
return this.mailAddress;
}
public void setMailAddress(String address)
{
this.mailAddress = address;
}
}