java.lang.Object
javax.swing.text.html.parser.AttributeList
- All Implemented Interfaces:
Serializable
,DTDConstants
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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionint
The attribute modifierThe attribute nameThe next attribute in the listint
The attribute typeThe default attribute valueVector
<?> The possible attribute valuesFields declared in interface 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
-
Constructor Summary
ConstructorDescriptionAttributeList
(String name) Create an attribute list element.AttributeList
(String name, int type, int modifier, String value, Vector<?> values, AttributeList next) Create an attribute list element. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the attribute modifier.getName()
Returns the attribute name.getNext()
Returns the next attribute in the list.int
getType()
Returns the attribute type.getValue()
Returns default attribute value.Enumeration
<?> Returns possible attribute values.static int
Converts an attribute name to the typetoString()
Returns a string representation of the object.static String
type2name
(int tp) Converts a type to the attribute name
-
Field Details
-
name
The attribute name -
type
public int typeThe attribute type -
values
The possible attribute values -
modifier
public int modifierThe attribute modifier -
value
The default attribute value -
next
The next attribute in the list
-
-
Constructor Details
-
AttributeList
Create an attribute list element.- Parameters:
name
- the attribute name
-
AttributeList
public AttributeList(String name, int type, int modifier, String value, Vector<?> values, AttributeList next) Create an attribute list element.- Parameters:
name
- the attribute nametype
- the attribute typemodifier
- the attribute modifiervalue
- the default attribute valuevalues
- the possible attribute valuesnext
- the next attribute in the list
-
-
Method Details
-
getName
Returns the attribute name.- Returns:
- the attribute name
-
getType
public int getType()Returns the attribute type.- Returns:
- the attribute type
- See Also:
-
getModifier
public int getModifier()Returns the attribute modifier.- Returns:
- the attribute modifier
- See Also:
-
getValues
Returns possible attribute values.- Returns:
- possible attribute values
-
getValue
Returns default attribute value.- Returns:
- default attribute value
-
getNext
Returns the next attribute in the list.- Returns:
- the next attribute in the list
-
toString
Description copied from class:Object
Returns a string representation of the object. -
name2type
Converts an attribute name to the type- Parameters:
nm
- an attribute name- Returns:
- the type
-
type2name
Converts a type to the attribute name- Parameters:
tp
- a type- Returns:
- the attribute name
-