This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text.html.parser
class ContentModel

java.lang.Object extended by 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 automata.

See Annex H on page 556 of the SGML handbook for more information.


Field Summary
 Object content
          The content.
 ContentModel next
          The next content model (in a ',', '|' or '&' expression).
 int type
          Type.
 
Constructor Summary

          

          Create a content model for an element.
ContentModel(int type, ContentModel content)

          Create a content model of a particular type.
ContentModel(int type, Object content, ContentModel next)

          Create a content model of a particular type.
 
Method Summary
 boolean

          Return true if the content model could match an empty input stream.
 Element

          Return the element that must be next.
 boolean
first(Object token)

          Return true if the token could potentially be the first token in the input stream.
 void

          Update elemVec with the list of elements that are part of the this contentModel.
 String

          Convert to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

content

public Object content
The content. Either an Element or a ContentModel.

next

public ContentModel next
The next content model (in a ',', '|' or '&' expression).

type

public int type
Type. Either '*', '?', '+', ',', '|', '&'.
Constructor Detail

ContentModel

public ContentModel()

ContentModel

public ContentModel(Element content)
Create a content model for an element.

Parameters:
content

ContentModel

public ContentModel(int type,
                    ContentModel content)
Create a content model of a particular type.

Parameters:
type
content

ContentModel

public ContentModel(int type,
                    Object content,
                    ContentModel next)
Create a content model of a particular type.

Parameters:
type
content
next
Method Detail

empty

public boolean empty()
Return true if the content model could match an empty input stream.


first

public Element first()
Return the element that must be next.


first

public boolean first(Object token)
Return true if the token could potentially be the first token in the input stream.

Parameters:
token

getElements

public void getElements(Vector elemVec)
Update elemVec with the list of elements that are part of the this contentModel.

Parameters:
elemVec

toString

public String toString()
Convert to a string.

Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.