模块 java.desktop

类 AttributeList

java.lang.Object
javax.swing.text.html.parser.AttributeList
所有已实现的接口:
Serializable , DTDConstants

public final class AttributeList extends Object implements DTDConstants , Serializable
此类使用 ATTLIST 构造定义 SGML 元素的属性,如 DTD 中所述。可以使用 getAttributes() 方法从 Element 类获取 AttributeList。

它实际上是链表中的一个元素。重复使用 getNext() 方法来枚举元素的所有属性。

参见:
  • 字段详细信息

    • name

      public String  name
      属性名称
    • type

      public int type
      属性类型
    • values

      public Vector <?> values
      可能的属性值
    • modifier

      public int modifier
      属性修饰符
    • value

      public String  value
      默认属性值
    • next

      public AttributeList  next
      列表中的下一个属性
  • 构造方法详细信息

    • AttributeList

      public AttributeList(String  name)
      创建属性列表元素。
      参数:
      name - 属性名称
    • AttributeList

      public AttributeList(String  name, int type, int modifier, String  value, Vector <?> values, AttributeList  next)
      创建属性列表元素。
      参数:
      name - 属性名称
      type - 属性类型
      modifier - 属性修饰符
      value - 默认属性值
      values - 可能的属性值
      next - 列表中的下一个属性
  • 方法详情

    • getName

      public String  getName()
      返回属性名称。
      返回:
      属性名称
    • getType

      public int getType()
      返回属性类型。
      返回:
      属性类型
      参见:
    • getModifier

      public int getModifier()
      返回属性修饰符。
      返回:
      属性修饰符
      参见:
    • getValues

      public Enumeration <?> getValues()
      返回可能的属性值。
      返回:
      可能的属性值
    • getValue

      public String  getValue()
      返回默认属性值。
      返回:
      默认属性值
    • getNext

      public AttributeList  getNext()
      返回列表中的下一个属性。
      返回:
      列表中的下一个属性
    • toString

      public String  toString()
      从类复制的描述:Object
      返回对象的字符串表示形式。
      重写:
      toString 在类 Object
      返回:
      字符串表示
    • name2type

      public static int name2type(String  nm)
      将属性名称转换为类型
      参数:
      nm - 属性名称
      返回:
      方式
    • type2name

      public static String  type2name(int tp)
      将类型转换为属性名称
      参数:
      tp - 一种类型
      返回:
      属性名称