Chinaunix首页 | 论坛 | 博客
  • 博客访问: 559017
  • 博文数量: 747
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4995
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-10 10:19
文章分类

全部博文(747)

文章存档

2011年(1)

2008年(746)

我的朋友
最近访客

分类:

2008-09-10 10:29:08

    /**

     * 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---------------------

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