Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.swing.text.html.parser.models
Class list  view list download list.java

java.lang.Object
  extended bygnu.javax.swing.text.html.parser.models.node
      extended bygnu.javax.swing.text.html.parser.models.list
All Implemented Interfaces:
java.io.Serializable

public class list
extends node
implements java.io.Serializable

Part of the internal representation of the content model.


Field Summary
static boolean CLEAR
          Setting to true means that the list nodes must always be connected by the same operation.
 node[] nodes
          A list of nodes.
private static long serialVersionUID
           
 
Fields inherited from class gnu.javax.swing.text.html.parser.models.node
_closed, binary, previous, token, unary, visits
 
Constructor Summary
list(char binary_operator, char unary_operator, node[] a_nodes)
          Creates a new model list that is a member of some enclosing list.
list(node[] a_nodes)
          Creates a new model list.
 
Method Summary
protected  void close()
          Closes all members in the list.
protected  boolean compare(java.lang.Object a_token)
          Compare given token with the token of this node.
 java.lang.Object findFreeNode()
          Find the token that could match as the next token in the token list.
 boolean isClosed()
          Returns true if all members in the list are closed.
 boolean matches(java.lang.Object[] tokens)
          Tries to match this list agains the given token sequence.
 boolean mustClose()
          The list never closes, despite it is trated as closed if all members in the list are closed.
 boolean performMatch(java.lang.Object token)
          Perform a match operation for the single token against this list.
 void reset()
          Prepeares the list for the next matching operation.
 java.lang.Object show(java.lang.Object x)
          Check if the provided token can match as a next token in the list.
 java.lang.String toString()
          Returns a string representation of the list.
 boolean valid()
          Returns true if all memebers in the list are valid.
 boolean validPreliminary()
          Returns true if all memebers in the list are either valid or unvisited.
 
Methods inherited from class gnu.javax.swing.text.html.parser.models.node
closePrevious, matches, silenceAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

CLEAR

public static boolean CLEAR
Setting to true means that the list nodes must always be connected by the same operation. This is far safer and clearer, but not required by default standard.


nodes

public final node[] nodes
A list of nodes.

Constructor Detail

list

public list(char binary_operator,
            char unary_operator,
            node[] a_nodes)
Creates a new model list that is a member of some enclosing list.


list

public list(node[] a_nodes)
     throws java.lang.Error
Creates a new model list. Assigns the previous field.

Method Detail

isClosed

public boolean isClosed()
Returns true if all members in the list are closed.

Overrides:
isClosed in class node

findFreeNode

public java.lang.Object findFreeNode()
Find the token that could match as the next token in the token list.

Overrides:
findFreeNode in class node

matches

public boolean matches(java.lang.Object[] tokens)
Tries to match this list agains the given token sequence.


mustClose

public boolean mustClose()
The list never closes, despite it is trated as closed if all members in the list are closed.

Overrides:
mustClose in class node

performMatch

public boolean performMatch(java.lang.Object token)
Perform a match operation for the single token against this list.

Overrides:
performMatch in class node

reset

public void reset()
Prepeares the list for the next matching operation.

Overrides:
reset in class node

show

public java.lang.Object show(java.lang.Object x)
Check if the provided token can match as a next token in the list. In the case of match, the list state changes, moving current position after the matched token. However if this method returns a suggested new token to insert before the provided one, the state of the list does not change.

Overrides:
show in class node

toString

public java.lang.String toString()
Returns a string representation of the list.

Overrides:
toString in class node

valid

public boolean valid()
Returns true if all memebers in the list are valid.

Overrides:
valid in class node

validPreliminary

public boolean validPreliminary()
Returns true if all memebers in the list are either valid or unvisited. The unvisited members can become valid after more tokens will be shown.

Overrides:
validPreliminary in class node

close

protected void close()
Closes all members in the list.

Overrides:
close in class node

compare

protected boolean compare(java.lang.Object a_token)
Compare given token with the token of this node. If the token represents a list, the call may be delegeted to the child subnodes.

Overrides:
compare in class node