java.lang.Object
javax.swing.text.html.parser.ContentModel
- All Implemented Interfaces:
- Serializable
public final class ContentModel extends Object implements Serializable
A representation of a content model. A content model is
 basically a restricted BNF expression. It is restricted in
 the sense that it must be deterministic. This means that you
 don't have to represent it as a finite state automaton.
See Annex H on page 556 of the SGML handbook for more information.
- 
Field SummaryFields Modifier and Type Field Description ObjectcontentThe content.ContentModelnextThe next content model (in a ',', '|' or '&' expression).inttypeType.
- 
Constructor SummaryConstructors Constructor Description ContentModel()CreatesContentModelContentModel(int type, Object content, ContentModel next)Create a content model of a particular type.ContentModel(int type, ContentModel content)Create a content model of a particular type.ContentModel(Element content)Create a content model for an element.
- 
Method SummaryModifier and Type Method Description booleanempty()Return true if the content model could match an empty input stream.Elementfirst()Return the element that must be next.booleanfirst(Object token)Return true if the token could potentially be the first token in the input stream.voidgetElements(Vector<Element> elemVec)Update elemVec with the list of elements that are part of the this contentModel.StringtoString()Convert to a string.
- 
Field Details
- 
Constructor Details- 
ContentModelpublic ContentModel()CreatesContentModel
- 
ContentModelCreate a content model for an element.- Parameters:
- content- the element
 
- 
ContentModelCreate a content model of a particular type.- Parameters:
- type- the type
- content- the content
 
- 
ContentModelCreate a content model of a particular type.- Parameters:
- type- the type
- content- the content
- next- the next content model
 
 
- 
- 
Method Details- 
emptypublic boolean empty()Return true if the content model could match an empty input stream.- Returns:
- trueif the content model could match an empty input stream
 
- 
getElementsUpdate elemVec with the list of elements that are part of the this contentModel.- Parameters:
- elemVec- the list of elements
 
- 
firstReturn true if the token could potentially be the first token in the input stream.- Parameters:
- token- the token
- Returns:
- trueif the token could potentially be the first token in the input stream
 
- 
firstReturn the element that must be next.- Returns:
- the element that must be next
 
- 
toStringConvert to a string.
 
-