JavaTM Platform
Standard Ed. 6

javax.xml.bind.annotation.adapters
クラス CollapsedStringAdapter

java.lang.Object
  上位を拡張 javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      上位を拡張 javax.xml.bind.annotation.adapters.CollapsedStringAdapter

public class CollapsedStringAdapter
extends XmlAdapter<String,String>

xs:token とその派生型を処理する組み込み XmlAdapter

このアダプタは、先頭と末尾の空白を削除した後、タブ、CR、LF、SP のシーケンスを 1 つの空白文字「 」に切り詰めます。

導入されたバージョン:
JAXB 2.0

コンストラクタの概要
CollapsedStringAdapter()
           
 
メソッドの概要
protected static boolean isWhiteSpace(char ch)
          指定された文字が空白文字である場合、true を返します。
 String marshal(String s)
          何もしません。
 String unmarshal(String text)
          パラメータとして与えられた文字列の先頭と末尾の空白を削除した後、タブ、CR、LF、SP のシーケンスを 1 つの空白文字「 」に切り詰めます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CollapsedStringAdapter

public CollapsedStringAdapter()
メソッドの詳細

unmarshal

public String unmarshal(String text)
パラメータとして与えられた文字列の先頭と末尾の空白を削除した後、タブ、CR、LF、SP のシーケンスを 1 つの空白文字「 」に切り詰めます。

定義:
クラス XmlAdapter<String,String> 内の unmarshal
パラメータ:
text - 変換する値。null も可

marshal

public String marshal(String s)
何もしません。 単にパラメータとして与えられたものと同じ文字列を返します。

定義:
クラス XmlAdapter<String,String> 内の marshal
パラメータ:
s - 変換する値。null も可

isWhiteSpace

protected static boolean isWhiteSpace(char ch)
指定された文字が空白文字である場合、true を返します。


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。