- java.lang.Object
- 
- javax.swing.text.html.parser.Element
 
- 
- すべての実装されたインタフェース:
- Serializable,- DTDConstants
 
 public final class Element extends Object implements DTDConstants, Serializable ELEMENT構成要素を使ってDTDに記述されたとおりの要素です。 これは、タグに不可欠な記述です。 タイプ、コンテンツ・モデル、属性、属性の型などを記述しています。この記述は、ドキュメントを正しく解析するためにParserによって使用されます。- 関連項目:
- DTD,- AttributeList
 
- 
- 
フィールドのサマリーフィールド 修飾子と型 フィールド 説明 AttributeListatts属性を指定しますContentModelcontentコンテンツ・モデルObjectdataユーザー・データを格納するフィールドです。BitSetexclusions要素の内部で発生してはならない要素のセットBitSetinclusions要素の内部で発生する要素のセットintindex要素インデックスStringname要素の名前ですbooleanoEnd終了タグを省略できる場合はtruebooleanoStart開始タグを省略できる場合はtrueinttype要素タイプ。- 
インタフェース javax.swing.text.html.parser.DTDConstantsで宣言されたフィールドANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
 
- 
 - 
メソッドのサマリー修飾子と型 メソッド 説明 AttributeListgetAttribute(String name)属性を名前で取得します。AttributeListgetAttributeByValue(String value)属性を値で取得します。AttributeListgetAttributes()属性を取得します。ContentModelgetContent()コンテンツ・モデルを返します。intgetIndex()インデックスを取得します。StringgetName()要素の名前を取得します。intgetType()型を取得します。booleanisEmpty()空かどうかを判定します。static intname2type(String nm)nmを型に変換します。booleanomitEnd()終了タグを省略できる場合にtrueを返します。booleanomitStart()開始タグを省略できる場合にtrueを返します。StringtoString()文字列に変換します。
 
- 
- 
- 
フィールドの詳細- 
indexpublic int index 要素インデックス
 - 
namepublic String name 要素の名前です
 - 
oStartpublic boolean oStart 開始タグを省略できる場合はtrue
 - 
oEndpublic boolean oEnd 終了タグを省略できる場合はtrue
 - 
inclusionspublic BitSet inclusions 要素の内部で発生する要素のセット
 - 
exclusionspublic BitSet exclusions 要素の内部で発生してはならない要素のセット
 - 
typepublic int type 要素タイプ。
 - 
contentpublic ContentModel content コンテンツ・モデル
 - 
attspublic AttributeList atts 属性を指定します
 - 
datapublic Object data ユーザー・データを格納するフィールドです。 ほとんどの場合、スタイル・シートの格納に使われます。
 
- 
 - 
メソッドの詳細- 
getNamepublic String getName() 要素の名前を取得します。- 戻り値:
- 要素の名前
 
 - 
omitStartpublic boolean omitStart() 開始タグを省略できる場合にtrueを返します。- 戻り値:
- 開始タグを省略できる場合はtrue
 
 - 
omitEndpublic boolean omitEnd() 終了タグを省略できる場合にtrueを返します。- 戻り値:
- 終了タグを省略できる場合はtrue
 
 - 
getTypepublic int getType() 型を取得します。- 戻り値:
- 要素の型
 
 - 
getContentpublic ContentModel getContent() コンテンツ・モデルを返します。- 戻り値:
- コンテンツ・モデル
 
 - 
getAttributespublic AttributeList getAttributes() 属性を取得します。- 戻り値:
- 要素を指定するAttributeList
 
 - 
getIndexpublic int getIndex() インデックスを取得します。- 戻り値:
- 要素インデックス
 
 - 
isEmptypublic boolean isEmpty() 空かどうかを判定します。- 戻り値:
- 現在の要素が空の場合はtrue
 
 - 
toStringpublic String toString() 文字列に変換します。
 - 
getAttributepublic AttributeList getAttribute(String name) 属性を名前で取得します。- パラメータ:
- name- 属性名
- 戻り値:
- 与えられたnameのAttributeList
 
 - 
getAttributeByValuepublic AttributeList getAttributeByValue(String value) 属性を値で取得します。- パラメータ:
- value- 値の文字列表現
- 戻り値:
- 与えられたvalueのAttributeList
 
 - 
name2typepublic static int name2type(String nm) nmを型に変換します。nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合は適切なDTDConstantsを返し、そうでない場合は0を返します。- パラメータ:
- nm- 名前
- 戻り値:
- nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合は適切なDTDConstants、そうでない場合は0。
 
 
- 
 
-