APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text.html.parser

public final Class AttributeList

extends Object
implements DTDConstants, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.text.html.parser.DTDConstants
Annotations
@SuppressWarnings:serial
Imports
java.util.Vector, .Hashtable, .Enumeration, java.io.*

This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct. An AttributeList can be obtained from the Element class using the getAttributes() method.

It is actually an element in a linked list. Use the getNext() method repeatedly to enumerate all the attributes of an element.

Author
Arthur Van Hoff
See Also
Element

Field Summary

Modifier and TypeField and Description
pack-priv static Hashtable<Object, Object>
attributeTypes

Create a hashtable of attribute types.

public int
modifier

The attribute modifier

public String
name

The attribute name

public AttributeList
next

The next attribute in the list

public int
type

The attribute type

public String
value

The default attribute value

public Vector<?>
values

The possible attribute values

Constructor Summary

AccessConstructor and Description
pack-priv
public
AttributeList(String
the attribute name
name
)

Create an attribute list element.

public
AttributeList(String
the attribute name
name
,
int
the attribute type
type
,
int
the attribute modifier
modifier
,
String
the default attribute value
value
,
Vector<?>
the possible attribute values
values
,
AttributeList
the next attribute in the list
next
)

Create an attribute list element.

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
public int

Returns:

the attribute modifier
getModifier
()

Returns the attribute modifier.

public String

Returns:

the attribute name
getName
()

Returns the attribute name.

public AttributeList

Returns:

the next attribute in the list
getNext
()

Returns the next attribute in the list.

public int

Returns:

the attribute type
getType
()

Returns the attribute type.

public String

Returns:

default attribute value
getValue
()

Returns default attribute value.

public Enumeration<?>

Returns:

possible attribute values
getValues
()

Returns possible attribute values.

public static int

Returns:

the type
name2type
(String
an attribute name
nm
)

Converts an attribute name to the type

public String

Returns:

string representation
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static String

Returns:

the attribute name
type2name
(int
a type
tp
)

Converts a type to the attribute name

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

attributeTypesback to summary
pack-priv static Hashtable<Object, Object> attributeTypes

Create a hashtable of attribute types.

modifierback to summary
public int modifier

The attribute modifier

nameback to summary
public String name

The attribute name

nextback to summary
public AttributeList next

The next attribute in the list

typeback to summary
public int type

The attribute type

valueback to summary
public String value

The default attribute value

valuesback to summary
public Vector<?> values

The possible attribute values

Constructor Detail

AttributeListback to summary
pack-priv AttributeList()
AttributeListback to summary
public AttributeList(String name)

Create an attribute list element.

Parameters
name:String

the attribute name

AttributeListback to summary
public AttributeList(String name, int type, int modifier, String value, Vector<?> values, AttributeList next)

Create an attribute list element.

Parameters
name:String

the attribute name

type:int

the attribute type

modifier:int

the attribute modifier

value:String

the default attribute value

values:Vector<?>

the possible attribute values

next:AttributeList

the next attribute in the list

Method Detail

defineAttributeTypeback to summary
pack-priv static void defineAttributeType(String nm, int val)
getModifierback to summary
public int getModifier()

Returns the attribute modifier.

Returns:int

the attribute modifier

See Also
DTDConstants
getNameback to summary
public String getName()

Returns the attribute name.

Returns:String

the attribute name

getNextback to summary
public AttributeList getNext()

Returns the next attribute in the list.

Returns:AttributeList

the next attribute in the list

getTypeback to summary
public int getType()

Returns the attribute type.

Returns:int

the attribute type

See Also
DTDConstants
getValueback to summary
public String getValue()

Returns default attribute value.

Returns:String

default attribute value

getValuesback to summary
public Enumeration<?> getValues()

Returns possible attribute values.

Returns:Enumeration<?>

possible attribute values

name2typeback to summary
public static int name2type(String nm)

Converts an attribute name to the type

Parameters
nm:String

an attribute name

Returns:int

the type

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

string representation

type2nameback to summary
public static String type2name(int tp)

Converts a type to the attribute name

Parameters
tp:int

a type

Returns:String

the attribute name