preverifytype.java
来自「MoMEUnit是一个单元测试的J2ME的应用程序xUnit架构实例。这是来自J」· Java 代码 · 共 74 行
JAVA
74 行
package org.momeunit.ant.taskdefs;import org.momeunit.ant.core.EnumType;/** * Preverify attribute representation. Contains method for accessing attribute * value as <code>boolean</code> {@link #asBoolean()}. Contains method * {@link #isOnlyAppJar()} for checking whether application jar file should be * preverified. * * @author Sergio Morozov * @version 1.1.2 * */public class PreverifyType extends EnumType{ private final static String[] VALUES = { "true", "yes", "false", "no", "on", "off", "appjar" }; private final static boolean[] BOOLEAN_VALUES = { true, true, false, false, true, false, false }; private final static boolean[] ONLY_APPJAR = { false, false, false, false, false, false, true }; /** * Instantiates PreverifyType initialized with given value. * * @param value * String value PreverifyType to be initialized with. * @since 1.1.2 */ public PreverifyType(String value) { super(value); } /* * (non-Javadoc) * * @see org.drmoro.ant.EnumType#getValues() */ protected String[] getValues() { return VALUES; } /** * Returns preverify attribute as boolean. * * @return <code>true</code> if preverify attribute is set to * <code>true, yes, on</code> and <code>false</code> otherwise. * @since 1.1.2 */ public boolean asBoolean() { return BOOLEAN_VALUES[getIndex()]; } /** * Checks whether application jar file should be preverified. * * @return <code>true</code> if application jar file should be preverified, * <code>false</code> otherwise. * @since 1.1.2 */ public boolean isOnlyAppJar() { return ONLY_APPJAR[getIndex()]; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?