|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.transformer.util.CFMLString
public final class CFMLString
this class is a Parser String optimized for the transfomer (CFML Parser)
Field Summary | |
---|---|
static short |
AT_LEAST_ONE_SPACE
Mindestens einen Space |
static short |
ZERO_OR_MORE_SPACE
Mindestens ein Space |
Constructor Summary | |
---|---|
CFMLString(SourceFile sf,
String charset,
boolean writeLog)
|
|
CFMLString(String text,
String charset)
Constructor of the class |
|
CFMLString(String text,
String charset,
boolean writeLog,
SourceFile sf)
Constructor of the class in this case source file is just for information |
Method Summary | |
---|---|
char |
charAt(int pos)
returns the character at the given position |
char |
charAtLower(int pos)
returns the character at the given position as lower case representation |
boolean |
equals(Object o)
Prueft ob das uebergebene Objekt diesem Objekt entspricht. |
boolean |
forwardIfCurrent(char c)
forward the internal pointer plus one if the next character is the same as the given input |
boolean |
forwardIfCurrent(char first,
char second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second, wenn ja wird der Zeiger um die Laenge der �bereinstimmung nach vorne gestellt. |
boolean |
forwardIfCurrent(short before,
String val,
short after)
Gibt zurueck ob ein Wert folgt und vor und hinterher Leerzeichen folgen. |
boolean |
forwardIfCurrent(String str)
forwards if the current character (internal pointer) and the following are the same as the given input |
boolean |
forwardIfCurrent(String str,
boolean startWithSpace)
|
boolean |
forwardIfCurrent(String str,
boolean startWithSpace,
boolean followedByNoVariableCharacter)
|
boolean |
forwardIfCurrent(String first,
char second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second, wenn ja wird der Zeiger um die Laenge der �bereinstimmung nach vorne gestellt. |
boolean |
forwardIfCurrent(String first,
String second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second, wenn ja wird der Zeiger um die Laenge der �bereinstimmung nach vorne gestellt. |
boolean |
forwardIfCurrent(String first,
String second,
boolean startWithSpace,
boolean followedByNoVariableCharacter)
|
boolean |
forwardIfCurrent(String first,
String second,
String third)
|
boolean |
forwardIfCurrent(String first,
String second,
String third,
boolean startWithSpace)
|
boolean |
forwardIfCurrent(String first,
String second,
String third,
boolean startWithSpace,
boolean followedByNoVariableCharacter)
|
boolean |
forwardIfCurrent(String first,
String second,
String third,
String forth)
|
boolean |
forwardIfCurrentAndNoVarExt(String str)
forwards if the current character (internal pointer) and the following are the same as the given input, followed by a none word character or a number |
boolean |
forwardIfCurrentAndNoWordAfter(String str)
forwards if the current character (internal pointer) and the following are the same as the given input, followed by a none word character |
String |
getCharset()
|
int |
getColumn()
Gibt die Stelle in der aktuelle Zeile zurueck, in welcher der Zeiger steht. |
int |
getColumn(int pos)
Gibt die Stelle in der Zeile auf die pos zeigt zurueck. |
char |
getCurrent()
returns the character of the current position of the internal pointer |
char |
getCurrentLower()
returns the lower case representation of the character of the current position |
int |
getLine()
Gibt die aktuelle Zeile zurueck in der der Zeiger des CFMLString steht. |
int |
getLine(int pos)
Gibt zurueck in welcher Zeile die angegebene Position ist. |
String |
getLineAsString()
Gibt die Zeile auf welcher der Zeiger steht als String zurueck. |
String |
getLineAsString(int line)
Gibt die angegebene Zeile als String zurueck. |
int |
getPos()
Gibt die aktuelle Position des Zeigers innerhalb des CFMLString zurueck. |
Position |
getPosition()
|
String |
getSource()
|
SourceFile |
getSourceFile()
Gibt die Quelle aus dem der CFML Code stammt als File Objekt zurueck, falls dies nicht aud einem File stammt wird null zurueck gegeben. |
String |
getText()
|
boolean |
getWriteLog()
|
boolean |
hasNext()
returns if the internal pointer is not on the last positions |
boolean |
hasNLBefore()
|
boolean |
hasSpaceBefore()
Gibt zurueck ob sich vor dem aktuellen Zeichen Leerzeichen befinden. |
int |
indexOfNext(char c)
Gibt zurueck, ausgehend von der aktuellen Position, wann das naechste Zeichen folgt das gleich ist wie die Eingabe, falls keines folgt wird �1 zurueck gegeben. |
boolean |
isAfterLast()
Gibt zurueck ob der Zeiger nach dem letzten Zeichen steht. |
boolean |
isCurrent(char c)
is the current character (internal pointer) the same as the given |
boolean |
isCurrent(char first,
char second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second. |
boolean |
isCurrent(String str)
returns if the current character (internal pointer) and the following are the same as the given input |
boolean |
isCurrent(String first,
char second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second. |
boolean |
isCurrent(String first,
String second)
Gibt zurueck ob first den folgenden Zeichen entspricht, gefolgt von Leerzeichen und second. |
boolean |
isCurrentBetween(char left,
char right)
is the character at the current position (internal pointer) in the range of the given input characters? |
boolean |
isCurrentLetter()
returns if the current character is a letter (a-z,A-Z) |
boolean |
isCurrentNumber()
returns if the current character is a number (0-9) |
boolean |
isCurrentSpecial()
retuns if the current character (internal pointer) is a valid special sign (_, $, Pound Symbol, Euro Symbol) |
boolean |
isCurrentVariableCharacter()
returns if the character at the current position (internal pointer) is a valid variable character |
boolean |
isLast()
Gibt zurueck ob der Zeiger auf dem letzten Zeichen steht. |
boolean |
isNext(char c)
is the character at the next position the same as the character provided by the input parameter |
boolean |
isValidIndex()
Gibt zurueck ob der Zeiger einen korrekten Index hat. |
String |
lastWord()
Gibt das letzte Wort das sich vor dem aktuellen Zeigerstand befindet zurueck, falls keines existiert wird null zurueck gegeben. |
int |
length()
Gibt die Laenge des CFMLString zurueck. |
void |
next()
moves the internal pointer to the next position, no check if the next position is still valid |
boolean |
nextLine()
Stellt den internen Zeiger an den Anfang der naechsten Zeile, gibt zurueck ob eine weitere Zeile existiert oder ob es bereits die letzte Zeile war. |
void |
previous()
moves the internal pointer to the previous position, no check if the next position is still valid |
String |
removeAndGetSpace()
|
boolean |
removeSpace()
Stellt den Zeiger nach vorne, wenn er sich innerhalb von Leerzeichen befindet, bis die Leerzeichen fertig sind. |
void |
setPos(int pos)
Setzt die Position des Zeigers innerhalb des CFMLString, ein ungueltiger index wird ignoriert. |
CFMLString |
subCFMLString(int start)
Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start bis zum Ende des CFMLString. |
CFMLString |
subCFMLString(int start,
int count)
Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start mit einer maximalen Laenge count. |
String |
substring(int start)
Gibt eine Untermenge des CFMLString als Zeichenkette zurueck, ausgehend von start bis zum Ende des CFMLString. |
String |
substring(int start,
int count)
Gibt eine Untermenge des CFMLString als Zeichenkette zurueck, ausgehend von start mit einer maximalen Laenge count. |
String |
substringLower(int start)
Gibt eine Untermenge des CFMLString als Zeichenkette in Kleinbuchstaben zurueck, ausgehend von start bis zum Ende des CFMLString. |
String |
substringLower(int start,
int count)
Gibt eine Untermenge des CFMLString als Zeichenkette in Kleinbuchstaben zurueck, ausgehend von start mit einer maximalen Laenge count. |
String |
toString()
Gibt den CFMLString als String zurueck. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short AT_LEAST_ONE_SPACE
public static final short ZERO_OR_MORE_SPACE
Constructor Detail |
---|
public CFMLString(SourceFile sf, String charset, boolean writeLog) throws IOException
IOException
public CFMLString(String text, String charset, boolean writeLog, SourceFile sf)
text
- charset
- writeLog
- sf
- public CFMLString(String text, String charset)
text
- charset
- Method Detail |
---|
public boolean hasNext()
public void next()
public void previous()
public char getCurrent()
public char getCurrentLower()
public char charAt(int pos)
public char charAtLower(int pos)
public boolean isNext(char c)
public boolean isCurrentBetween(char left, char right)
left
- lower value.right
- upper value.public boolean isCurrentVariableCharacter()
public boolean isCurrentLetter()
public boolean isCurrentNumber()
public boolean isCurrentSpecial()
public boolean isCurrent(char c)
public boolean forwardIfCurrent(char c)
public boolean isCurrent(String str)
public boolean forwardIfCurrent(String str)
public boolean forwardIfCurrent(String str, boolean startWithSpace)
str
- string to check against current positionstartWithSpace
- if true there must be whitespace at the current position
public boolean forwardIfCurrent(String str, boolean startWithSpace, boolean followedByNoVariableCharacter)
str
- string to check against current positionstartWithSpace
- if true there must be whitespace at the current positionfollowedByNoVariableCharacter
- the character following the string must be a none variable character (!a-z,A-Z,0-9,_$) (not eaten)
public boolean forwardIfCurrentAndNoWordAfter(String str)
public boolean forwardIfCurrentAndNoVarExt(String str)
public boolean isCurrent(String first, char second)
first
- Erste Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweite Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean isCurrent(char first, char second)
first
- Erstes Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweites Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean forwardIfCurrent(String first, char second)
first
- Erste Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweite Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean forwardIfCurrent(short before, String val, short after)
before
- Definition der Leerzeichen vorher.val
- Gefolgter Wert der erartet wird.after
- Definition der Leerzeichen nach dem Wert.
public boolean forwardIfCurrent(char first, char second)
first
- Erste Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweite Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean isCurrent(String first, String second)
first
- Erste Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweite Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean forwardIfCurrent(String first, String second)
first
- Erste Zeichen zum Vergleich (Vor den Leerzeichen).second
- Zweite Zeichen zum Vergleich (Nach den Leerzeichen).
public boolean forwardIfCurrent(String first, String second, String third)
public boolean forwardIfCurrent(String first, String second, String third, boolean startWithSpace)
public boolean forwardIfCurrent(String first, String second, String third, boolean startWithSpace, boolean followedByNoVariableCharacter)
public boolean forwardIfCurrent(String first, String second, boolean startWithSpace, boolean followedByNoVariableCharacter)
public boolean forwardIfCurrent(String first, String second, String third, String forth)
public boolean hasSpaceBefore()
public boolean hasNLBefore()
public boolean removeSpace()
public String removeAndGetSpace()
public boolean nextLine()
public String substring(int start)
start
- Von wo aus die Untermege ausgegeben werden soll.
public String substring(int start, int count)
start
- Von wo aus die Untermenge ausgegeben werden soll.count
- Wie lange die zurueckgegebene Zeichenkette maximal sein darf.
public String substringLower(int start)
start
- Von wo aus die Untermenge ausgegeben werden soll.
public String substringLower(int start, int count)
start
- Von wo aus die Untermenge ausgegeben werden soll.count
- Wie lange die zurueckgegebene Zeichenkette maximal sein darf.
public CFMLString subCFMLString(int start)
start
- Von wo aus die Untermenge ausgegeben werden soll.
public CFMLString subCFMLString(int start, int count)
start
- Von wo aus die Untermenge ausgegeben werden soll.count
- Wie lange die zurueckgegebene Zeichenkette maximal sein darf.
public String toString()
toString
in class Object
Object.toString()
public int getPos()
public void setPos(int pos)
pos
- Position an die der Zeiger gestellt werde soll.public int getLine()
public Position getPosition()
public int getLine(int pos)
pos
- Position von welcher die Zeile erfragt wird
public int getColumn()
public int getColumn(int pos)
pos
- Position von welcher die Zeile erfragt wird
public String getLineAsString()
public String getLineAsString(int line)
line
- Zeile die zurueck gegeben werden soll
public boolean isLast()
public boolean isAfterLast()
public boolean isValidIndex()
public int indexOfNext(char c)
c
- gesuchtes Zeichen
public String lastWord()
public int length()
public SourceFile getSourceFile()
public boolean equals(Object o)
equals
in class Object
o
- Object zum vergleichen.
public String getCharset()
public boolean getWriteLog()
public String getText()
public String getSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |