JavaTM 2 Platform
Standard Ed. 6

javax.swing.text.html.parser
类 AttributeList

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

public final class AttributeList
extends Object
implements DTDConstants, Serializable

此类使用 ATTLIST 构造定义 DTD 中描述的 SGML 元素的属性。可以使用 getAttributes() 方法从 Element 类中获取 AttributeList。

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

另请参见:
Element

字段摘要
 int modifier
           
 String name
           
 AttributeList next
           
 int type
           
 String value
           
 Vector<?> values
           
 
从接口 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
 
构造方法摘要
AttributeList(String name)
          创建一个属性列表元素。
AttributeList(String name, int type, int modifier, String value, Vector<?> values, AttributeList next)
          创建一个属性列表元素。
 
方法摘要
 int getModifier()
           
 String getName()
           
 AttributeList getNext()
           
 int getType()
           
 String getValue()
           
 Enumeration<?> getValues()
           
static int name2type(String nm)
           
 String toString()
          返回该对象的字符串表示。
static String type2name(int tp)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

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)
创建一个属性列表元素。


AttributeList

public AttributeList(String name,
                     int type,
                     int modifier,
                     String value,
                     Vector<?> values,
                     AttributeList next)
创建一个属性列表元素。

方法详细信息

getName

public String getName()
返回:
属性名

getType

public int getType()
返回:
属性类型
另请参见:
DTDConstants

getModifier

public int getModifier()
返回:
属性修饰语
另请参见:
DTDConstants

getValues

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

getValue

public String getValue()
返回:
默认的属性值

getNext

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

toString

public String toString()
从类 Object 复制的描述
返回该对象的字符串表示。通常,toString 方法会返回一个“以文本方式表示”此对象的字符串。结果应是一个简明但易于读懂的信息表达式。建议所有子类都重写此方法。

Object 类的 toString 方法返回一个字符串,该字符串由类名(对象是该类的一个实例)、at 标记符“@”和此对象哈希码的无符号十六进制表示组成。换句话说,该方法返回一个字符串,它的值等于:

getClass().getName() + '@' + Integer.toHexString(hashCode())
 

覆盖:
Object 中的 toString
返回:
字符串表示形式

name2type

public static int name2type(String nm)

type2name

public static String type2name(int tp)

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only