Package com.twelfthmile.yuga
Class Yuga
- java.lang.Object
-
- com.twelfthmile.yuga.Yuga
-
public class Yuga extends Object
Created by johnjoseph on 19/03/17.
-
-
Constructor Summary
Constructors Constructor Description Yuga()
-
Method Summary
Modifier and Type Method Description static Pair<Integer,String>checkTypes(String type, String word)static voidinit()static Responseparse(String str)Returns Response containing data-type, captured string and index upto which data was readstatic Responseparse(String str, Map<String,String> config)Returns Response containing data-type, captured string and index upto which data was readstatic Pair<Integer,Date>parseDate(String str)Returns Pair of index upto which date was read and the date objectstatic Pair<Integer,Date>parseDate(String str, Map<String,String> config)Returns Pair of index upto which date was read and the date object
-
-
-
Method Detail
-
init
public static void init()
-
parseDate
public static Pair<Integer,Date> parseDate(String str)
Returns Pair of index upto which date was read and the date object- Parameters:
str- date string- Returns:
- A last index for date string, b date object returns null if string is not of valid date format
-
parseDate
public static Pair<Integer,Date> parseDate(String str, Map<String,String> config)
Returns Pair of index upto which date was read and the date object- Parameters:
str- date stringconfig- pass the message date string for defaulting- Returns:
- A last index for date string, b date object returns null if string is not of valid date format
-
parse
public static Response parse(String str, Map<String,String> config)
Returns Response containing data-type, captured string and index upto which data was read- Parameters:
str- string to be parsedconfig- config for parsing (Eg: date-defaulting)- Returns:
- Yuga Response type
-
parse
public static Response parse(String str)
Returns Response containing data-type, captured string and index upto which data was read- Parameters:
str- string to be parsed- Returns:
- Yuga Response type
-
-