📄 schemanormalizedstring.java
字号:
/**
* SchemaNormalizedString.java
*
* This file was generated by XMLSpy 2007sp2 Enterprise Edition.
*
* YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
* OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
*
* Refer to the XMLSpy Documentation for further details.
* http://www.altova.com/xmlspy
*/
package com.jmex.xml.types;
public class SchemaNormalizedString extends SchemaString {
public static final byte WHITESPACE_PRESERVE = 1;
public static final byte WHITESPACE_REPLACE = 2;
public static final byte WHITESPACE_COLLAPSE = 3;
public SchemaNormalizedString() {
super();
}
public SchemaNormalizedString(String newvalue) {
super(newvalue);
}
public SchemaNormalizedString(SchemaNormalizedString newvalue) {
super((SchemaString)newvalue);
}
public static final String normalize(byte norm, String s)
{
if (s == null)
return null;
if (norm == WHITESPACE_COLLAPSE )
return s.replaceAll("\\s{2,}", "").trim();
if (norm == WHITESPACE_REPLACE)
return s.replace('\n', ' ').replace('\r', ' ').replace('\t', ' ');
return s;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -