Package org.opencypher.grammar
Class Grammar.CharacterSet
- java.lang.Object
-
- org.opencypher.grammar.Grammar.Term
-
- org.opencypher.grammar.Grammar.CharacterSet
-
- All Implemented Interfaces:
CharacterSet,LocationAware
- Enclosing interface:
- Grammar
public static final class Grammar.CharacterSet extends Grammar.Term
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opencypher.grammar.CharacterSet
CharacterSet.DefinitionVisitor<EX extends Exception>, CharacterSet.ExclusionVisitor<EX extends Exception>, CharacterSet.Unicode
-
-
Field Summary
-
Fields inherited from interface org.opencypher.grammar.CharacterSet
ANY, EOI
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <EX extends Exception>
voidaccept(CharacterSet.DefinitionVisitor<EX> visitor)static org.opencypher.grammar.CharacterSetNodecharSet(String name)booleancontains(int codePoint)booleanequals(Object o)Grammar.CharacterSetexcept(int... codePoints)booleanhasExclusions()inthashCode()booleanisControlCharacter()voidlocation(String path, int lineNumber, int columnNumber)Invoked with the location of this element.Stringname()Returns the name of this set if this is a named set, ornullif this is not a named set.intrandomCodePoint(Random random)voidset(String set)Sets the name or definition of the set to base these characters on.StringtoString()<P,T,EX extends Exception>
Ttransform(TermTransformation<P,T,EX> transformation, P param)-
Methods inherited from class org.opencypher.grammar.Grammar.Term
accept
-
-
-
-
Method Detail
-
except
public Grammar.CharacterSet except(int... codePoints)
-
set
public void set(String set)
Sets the name or definition of the set to base these characters on. The set can either be the name of a well-known unicode set (such as"ID_Start"), or it can be a set of characters in unicode set notation.The set of well-known unicode set names are defined in the
Unicode enum, in addition to those"EOI"or"EOF"are also accepted and means a "character" representing the end of the input stream.Unicode set notation needs to be enclosed within
[and]and needs to be a sequence of either:- A single character, or
- a range of character, denoted as two characters with a dash (
-) in between.
- Parameters:
set- The set to base these characters on.
-
isControlCharacter
public boolean isControlCharacter()
- Specified by:
isControlCharacterin interfaceCharacterSet
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
transform
public <P,T,EX extends Exception> T transform(TermTransformation<P,T,EX> transformation, P param) throws EX extends Exception
- Specified by:
transformin classGrammar.Term- Throws:
EX extends Exception
-
name
public String name()
Description copied from interface:CharacterSetReturns the name of this set if this is a named set, ornullif this is not a named set.- Specified by:
namein interfaceCharacterSet- Returns:
- the name of this set.
-
accept
public <EX extends Exception> void accept(CharacterSet.DefinitionVisitor<EX> visitor) throws EX extends Exception
- Specified by:
acceptin interfaceCharacterSet- Throws:
EX extends Exception
-
randomCodePoint
public int randomCodePoint(Random random)
- Specified by:
randomCodePointin interfaceCharacterSet
-
contains
public boolean contains(int codePoint)
- Specified by:
containsin interfaceCharacterSet
-
hasExclusions
public boolean hasExclusions()
- Specified by:
hasExclusionsin interfaceCharacterSet
-
charSet
public static org.opencypher.grammar.CharacterSetNode charSet(String name)
-
location
public final void location(String path, int lineNumber, int columnNumber)
Description copied from interface:LocationAwareInvoked with the location of this element.- Specified by:
locationin interfaceLocationAware- Parameters:
path- the path to the XML file this element was read from.lineNumber- the line number in that XML file at which this element was read.columnNumber- the column number in the line at which this element was read.
-
-