Top Description Fields Constructors Methods
org.h2.bnf

public Class RuleElement

extends Object
implements Rule
Class Inheritance
All Implemented Interfaces
org.h2.bnf.Rule
Imports
java.util.HashMap, org.h2.util.StringUtils

A single terminal rule in a BNF object.

Field Summary

Modifier and TypeField and Description
private final boolean
private Rule
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
RuleElement(String name, String topic)

Method Summary

Modifier and TypeMethod and Description
public void
accept(BnfVisitor
the visitor
visitor
)

Implements org.h2.bnf.Rule.accept.

Call the visit method in the given visitor.

public boolean
autoComplete(Sentence
the sentence context
sentence
)

Implements org.h2.bnf.Rule.autoComplete.

Add the next possible token(s).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

keywordback to summary
private final boolean keyword
nameback to summary
private final String name
typeback to summary
private final int type

Constructor Detail

RuleElementback to summary
public RuleElement(String name, String topic)

Method Detail

acceptback to summary
public void accept(BnfVisitor visitor)

Implements org.h2.bnf.Rule.accept.

Doc from org.h2.bnf.Rule.accept.

Call the visit method in the given visitor.

Parameters
visitor:BnfVisitor

the visitor

Annotations
@Override
autoCompleteback to summary
public boolean autoComplete(Sentence sentence)

Implements org.h2.bnf.Rule.autoComplete.

Doc from org.h2.bnf.Rule.autoComplete.

Add the next possible token(s). If there was a match, the query in the sentence is updated (the matched token is removed).

Parameters
sentence:Sentence

the sentence context

Returns:boolean

true if a full match

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override