Class AttributeList
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
FieldsModifier and TypeFieldDescriptionintThe attribute modifierThe attribute nameThe next attribute in the listintThe attribute typeThe default attribute valueVector<?> The possible attribute valuesFields declared in interface 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, SYSTEMModifier and TypeFieldDescriptionstatic final intThe DTD constant corresponds to ANYstatic final intThe DTD constant corresponds to CDATAstatic final intThe DTD constant corresponds to CONREFstatic final intThe DTD constant corresponds to CURRENTstatic final intThe DTD constant corresponds to DEFAULTstatic final intThe DTD constant corresponds to EMPTYstatic final intThe DTD constant corresponds to ENDTAGstatic final intThe DTD constant corresponds to ENTITIESstatic final intThe DTD constant corresponds to ENTITYstatic final intThe DTD constant corresponds to FIXEDstatic final intThe DTD constant corresponds to GENERALstatic final intThe DTD constant corresponds to IDstatic final intThe DTD constant corresponds to IDREFstatic final intThe DTD constant corresponds to IDREFSstatic final intThe DTD constant corresponds to IMPLIEDstatic final intThe DTD constant corresponds to MDstatic final intThe DTD constant corresponds to MODELstatic final intThe DTD constant corresponds to MSstatic final intThe DTD constant corresponds to NAMEstatic final intThe DTD constant corresponds to NAMESstatic final intThe DTD constant corresponds to NMTOKENstatic final intThe DTD constant corresponds to NMTOKENSstatic final intThe DTD constant corresponds to NOTATIONstatic final intThe DTD constant corresponds to NUMBERstatic final intThe DTD constant corresponds to NUMBERSstatic final intThe DTD constant corresponds to NUTOKENstatic final intThe DTD constant corresponds to NUTOKENSstatic final intThe DTD constant corresponds to PARAMETERstatic final intThe DTD constant corresponds to PIstatic final intThe DTD constant corresponds to PUBLICstatic final intThe DTD constant corresponds to RCDATAstatic final intThe DTD constant corresponds to REQUIREDstatic final intThe DTD constant corresponds to SDATAstatic final intThe DTD constant corresponds to STARTTAGstatic final intThe DTD constant corresponds to SYSTEM -
Constructor Summary
ConstructorsConstructorDescriptionAttributeList(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 TypeMethodDescriptionintReturns the attribute modifier.getName()Returns the attribute name.getNext()Returns the next attribute in the list.intgetType()Returns the attribute type.getValue()Returns default attribute value.Enumeration<?> Returns possible attribute values.static intConverts an attribute name to the typetoString()Answers a string containing a concise, human-readable description of the receiver.static Stringtype2name(int tp) Converts a type to the attribute nameMethods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
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
-
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
-
getNext
Returns the next attribute in the list.- Returns:
- the next attribute in the list
-
toString
-
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
-