railo.runtime.op.date
Class DateString

java.lang.Object
  extended by railo.runtime.op.date.DateString

public final class DateString
extends Object

helper class to convert a string to a Object


Constructor Summary
DateString(String str)
          constructor of the class
 
Method Summary
 char charAt(int pos)
          return char at given position
 char current()
           
 boolean fwIfCurrent(char c)
          forward inner cursor if value at actuell position is same as given.
 boolean fwIfNext(char c)
          forward inner cursor if value at the next position is same as given.
 int getPos()
           
 boolean isAfterLast()
          returns if cursor is after the last position
 boolean isCurrent(char c)
          check if char a actuell position of the inner cursor is same value like given value
 boolean isDigit()
          returns if value at cursor position is a digit or not
 boolean isDigit(char c)
          returns if c is a digit or not
 boolean isLast()
          returns if cursor is on the last position
 boolean isLast(char c)
          check if last char has same value than given char
 boolean isLastDigit()
          returns if last char is a digit or not
 boolean isNext(char c)
          check if char a actuell position of the inner cursor is same value like given value
 boolean isValidIndex()
          returns if cursor is on a valid position
 int length()
           
 void next()
          set inner cursor one forward
 void next(int count)
          set inner cursor [count] forward
 int readDigits()
          read in the next digits from current position
 int readMonthString()
           
 boolean removeWhitespace()
           
 void reset()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateString

public DateString(String str)
constructor of the class

Parameters:
str - Date String
Method Detail

isNext

public boolean isNext(char c)
check if char a actuell position of the inner cursor is same value like given value

Parameters:
c - char to compare
Returns:
is same or not

isCurrent

public boolean isCurrent(char c)
check if char a actuell position of the inner cursor is same value like given value

Parameters:
c - char to compare
Returns:
is same or not

isLast

public boolean isLast(char c)
check if last char has same value than given char

Parameters:
c - char to check
Returns:
is same or not

next

public void next()
set inner cursor one forward


next

public void next(int count)
set inner cursor [count] forward

Parameters:
count - forward count

length

public int length()
Returns:
the length of the inner String

fwIfCurrent

public boolean fwIfCurrent(char c)
forward inner cursor if value at actuell position is same as given.

Parameters:
c - char to compare
Returns:
has forwared or not

fwIfNext

public boolean fwIfNext(char c)
forward inner cursor if value at the next position is same as given.

Parameters:
c - char to compare
Returns:
has forwared or not

readDigits

public int readDigits()
read in the next digits from current position

Returns:
value from the digits

removeWhitespace

public boolean removeWhitespace()

readMonthString

public int readMonthString()

isDigit

public boolean isDigit(char c)
returns if c is a digit or not

Parameters:
c - char to check
Returns:
is digit

isDigit

public boolean isDigit()
returns if value at cursor position is a digit or not

Returns:
is dgit

isLastDigit

public boolean isLastDigit()
returns if last char is a digit or not

Returns:
is dgit

charAt

public char charAt(int pos)
return char at given position

Parameters:
pos - postion to get value
Returns:
character from given position

isLast

public boolean isLast()
returns if cursor is on the last position

Returns:
is on last

isAfterLast

public boolean isAfterLast()
returns if cursor is after the last position

Returns:
is after the last

isValidIndex

public boolean isValidIndex()
returns if cursor is on a valid position

Returns:
is after the last

current

public char current()

getPos

public int getPos()

reset

public void reset()


Copyright © 2012 Railo