Class Overview
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.
Summary
Public Methods |
boolean
|
empty()
Return true if the content model could
match an empty input stream.
|
Element
|
first()
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
|
getElements(Vector<Element> elemVec)
Update elemVec with the list of elements that are
part of the this contentModel.
|
String
|
toString()
Convert to a string.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Fields
public
Object
content
The content. Either an Element or a ContentModel.
The next content model (in a ',', '|' or '&' expression).
public
int
type
Type. Either '*', '?', '+', ',', '|', '&'.
Public Constructors
public
ContentModel
(Element content)
Create a content model for an element.
public
ContentModel
(int type, ContentModel content)
Create a content model of a particular type.
public
ContentModel
(int type, Object content, ContentModel next)
Create a content model of a particular type.
Public Methods
public
boolean
empty
()
Return true if the content model could
match an empty input stream.
public
Element
first
()
Return the element that must be next.
public
boolean
first
(Object token)
Return true if the token could potentially be the
first token in the input stream.
public
void
getElements
(Vector<Element> elemVec)
Update elemVec with the list of elements that are
part of the this contentModel.
public
String
toString
()
Returns
- a string representation of the object.