⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 summaryattribute.java

📁 MoMEUnit是一个单元测试的J2ME的应用程序xUnit架构实例。这是来自JUnit框架
💻 JAVA
字号:
package org.momeunit.ant.taskdefs;import org.momeunit.ant.core.EnumType;/** * Summary attribute representation. Contains method for accessing attribute * value as <code>boolean</code> {@link #asBoolean()}. Contains method to * check whether to include the output of emulator and tests run written to * <code>System.out</code> and <code>System.err</code> * {@link #isWithOutAndErr()}. *  * @author Sergio Morozov * @version 1.1.2 */public class SummaryAttribute extends EnumType{  private final static String[] VALUES = { "true", "yes", "false", "no", "on",      "off", "withoutanderr" };  private final static boolean[] BOOLEAN_VALUES = { true, true, false, false,      true, false, true };  private final static boolean[] WITHOUTANDERR = { false, false, false, false,      false, false, true };  /**   * Instantiates SummaryAttribute initialized with given value.   *    * @param value   *          SummaryAttribute to be initialized with.   * @since 1.1.2   */  public SummaryAttribute(String value)  {    super(value);  }  /*   * (non-Javadoc)   *    * @see org.drmoro.ant.EnumType#getValues()   */  protected String[] getValues()  {    return VALUES;  }  /**   * Returns summary attribute as boolean.   *    * @return <code>false</code> if summary attribute is set to   *         <code>false, no, off</code> and <code>true</code> otherwise.   * @since 1.1.1   */  public boolean asBoolean()  {    return BOOLEAN_VALUES[getIndex()];  }  /**   * Checks whether to include the output of emulator and tests run written to   * <code>System.out</code> and <code>System.err</code>.   *    * @return <code>true</code> if summary attribute is set to   *         <code>withOutAndErr</code>, <code>false</code> otherwise.   * @since 1.1.1   */  public boolean isWithOutAndErr()  {    return WITHOUTANDERR[getIndex()];  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -