📄 idverifier.java
字号:
/* * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */package samples.ejb.stateful.simple.tools;/** * Utility class, verifies the id of customers. */public class IdVerifier { /** * Default constructor. */ public IdVerifier() { } /** * Validates a given id for a customer. * @param id id as a string. * @return true if success, false otherwise. */ public boolean validate(String id) { boolean result = true; for (int i = 0; i < id.length(); i++) { if (Character.isDigit(id.charAt(i)) == false) result = false; } return result; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -