分类:
2008-09-09 17:22:12
/**
* roonten.practice.tools.identitycard\IdentityCard.java
*
* Copyright (c) 2008 patulous function toolkit for java, individual
* All rights reserved.
*
* This toolkit all my items one is the last edition. All the tools in the toolkit are defining
* some handy discreteness for me. So I can doing items easily. I hope you unfeignedly
* for use it.
*/
package roonten.practice.tools.identitycard;
import java.util.Calendar;
/**
*
* The IdentityCard
class is implements IIdentityCard
* interface.In this interface there're some about checking an identity
* card need to using methods. For example, the year and the month and the day
* part this identity card must be right.
*
*
* @author Roon Ten
* @version 1.2
*/
public class IdentityCard {
private char[] chrs;
private final String CHECK_STRING0 = "([0-9]{17})[0-9Xx]";
/**
* Create an object of this class by an scheduled identity card.
* @param obj
*/
public IdentityCard(Object obj) {
chrs = getChrs(obj);
}
/**
* Get a team for character by this identity card.
* @param obj
* @return
*/
private char[] getChrs(Object obj) {
return String.valueOf(obj).toCharArray();
}
/**
[1]