Chinaunix首页 | 论坛 | 博客
  • 博客访问: 483490
  • 博文数量: 1496
  • 博客积分: 79800
  • 博客等级: 大将
  • 技术积分: 9940
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-09 13:22
文章分类

全部博文(1496)

文章存档

2011年(1)

2008年(1495)

我的朋友

分类:

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]     

【责编:landy】

--------------------next---------------------

阅读(140) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~