org.test4j.hamcrest.matcher.string
枚举 StringMode

java.lang.Object
  继承者 java.lang.Enum<StringMode>
      继承者 org.test4j.hamcrest.matcher.string.StringMode
所有已实现的接口:
Serializable, Comparable<StringMode>

public enum StringMode
extends Enum<StringMode>

String Matcher配置模式

作者:
darui.wudr

枚举常量摘要
IgnoreCase
          忽略大小写
IgnoreQuato
          忽略引号(单引号和双引号)
IgnoreSpace
          忽略空格
SameAsQuato
          把单引号,双引号当作一样处理
如果 IgnoreQuato = true,则不存在这种情况
SameAsSlash
          将斜杠 '\' 和反斜杠 '/' 都当作斜杠处理
SameAsSpace
          把所有空格当做一样处理
即多个空格,换行,换页,TAB等等都当作一个空格来对待
如果 IgnoreSpace = true ,则不存在这种情况
 
方法摘要
static String getStringByMode(String input, StringMode... modes)
          返回经过StringMode处理过的字符串
abstract  String process(String input)
          把字符串按模式处理完返回
static String toString(StringMode... modes)
           
static StringMode valueOf(String name)
          返回带有指定名称的该类型的枚举常量。
static StringMode[] values()
          按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。
 
从类 java.lang.Enum 继承的方法
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
从类 java.lang.Object 继承的方法
getClass, notify, notifyAll, wait, wait, wait
 

枚举常量详细信息

IgnoreCase

public static final StringMode IgnoreCase
忽略大小写


IgnoreSpace

public static final StringMode IgnoreSpace
忽略空格


IgnoreQuato

public static final StringMode IgnoreQuato
忽略引号(单引号和双引号)


SameAsSpace

public static final StringMode SameAsSpace
把所有空格当做一样处理
即多个空格,换行,换页,TAB等等都当作一个空格来对待
如果 IgnoreSpace = true ,则不存在这种情况


SameAsQuato

public static final StringMode SameAsQuato
把单引号,双引号当作一样处理
如果 IgnoreQuato = true,则不存在这种情况


SameAsSlash

public static final StringMode SameAsSlash
将斜杠 '\' 和反斜杠 '/' 都当作斜杠处理

方法详细信息

values

public static StringMode[] values()
按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。该方法可用于迭代 常量,如下所示:
for (StringMode c : StringMode.values())
    System.out.println(c);


valueOf

public static StringMode valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格。)

参数:
name - 要返回的枚举常量的名称。
返回:
返回带有指定名称的枚举常量
抛出:
如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentException

process

public abstract String process(String input)
把字符串按模式处理完返回

参数:
input -
modes -
返回:

getStringByMode

public static String getStringByMode(String input,
                                     StringMode... modes)
返回经过StringMode处理过的字符串

参数:
input -
modes -
返回:

toString

public static String toString(StringMode... modes)


Copyright © 2013. All rights reserved.