モジュール java.desktop

クラスElement

  • すべての実装されたインタフェース:
    Serializable, DTDConstants


    public final class Element
    extends Object
    implements DTDConstants, Serializable
    ELEMENT構成要素を使ってDTDに記述されたとおりの要素です。 これは、タグに不可欠な記述です。 タイプ、コンテンツ・モデル、属性、属性の型などを記述しています。この記述は、ドキュメントを正しく解析するためにParserによって使用されます。
    関連項目:
    DTD, AttributeList, 「直列化されたフォーム」
    • フィールドの詳細

      • index

        public int index
        要素インデックス
      • name

        public String name
        要素の名前です
      • oStart

        public boolean oStart
        開始タグを省略できる場合はtrue
      • oEnd

        public boolean oEnd
        終了タグを省略できる場合はtrue
      • inclusions

        public BitSet inclusions
        要素の内部で発生する要素のセット
      • exclusions

        public BitSet exclusions
        要素の内部で発生してはならない要素のセット
      • type

        public int type
        要素タイプ。
      • content

        public ContentModel content
        コンテンツ・モデル
      • data

        public Object data
        ユーザー・データを格納するフィールドです。 ほとんどの場合、スタイル・シートの格納に使われます。
    • メソッドの詳細

      • getName

        public String getName​()
        要素の名前を取得します。
        戻り値:
        要素の名前
      • omitStart

        public boolean omitStart​()
        開始タグを省略できる場合にtrueを返します。
        戻り値:
        開始タグを省略できる場合はtrue
      • omitEnd

        public boolean omitEnd​()
        終了タグを省略できる場合にtrueを返します。
        戻り値:
        終了タグを省略できる場合はtrue
      • getType

        public int getType​()
        型を取得します。
        戻り値:
        要素の型
      • getContent

        public ContentModel getContent​()
        コンテンツ・モデルを返します。
        戻り値:
        コンテンツ・モデル
      • getAttributes

        public AttributeList getAttributes​()
        属性を取得します。
        戻り値:
        要素を指定するAttributeList
      • getIndex

        public int getIndex​()
        インデックスを取得します。
        戻り値:
        要素インデックス
      • isEmpty

        public boolean isEmpty​()
        空かどうかを判定します。
        戻り値:
        現在の要素が空の場合はtrue
      • toString

        public String toString​()
        文字列に変換します。
        オーバーライド:
        toString 、クラス:  Object
        戻り値:
        指定されたElementインスタンスの文字列表現
      • getAttribute

        public AttributeList getAttribute​(String name)
        属性を名前で取得します。
        パラメータ:
        name - 属性名
        戻り値:
        与えられたnameAttributeList
      • getAttributeByValue

        public AttributeList getAttributeByValue​(String value)
        属性を値で取得します。
        パラメータ:
        value - 値の文字列表現
        戻り値:
        与えられたvalueAttributeList
      • name2type

        public static int name2type​(String nm)
        nmを型に変換します。 nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合は適切なDTDConstantsを返し、そうでない場合は0を返します。
        パラメータ:
        nm - 名前
        戻り値:
        nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合は適切なDTDConstants、そうでない場合は0。