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()Returns a string representation of the object.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()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
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
-