Class Yuga

java.lang.Object
com.twelfthmile.yuga.Yuga

public class Yuga extends Object
Created by johnjoseph on 19/03/17.
  • Constructor Details

    • Yuga

      public Yuga()
  • Method Details

    • 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 string
      config - 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 parsed
      config - 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
    • checkTypes

      public static Pair<Integer,String> checkTypes(String type, String word)
    • getYugaResponseOutput

      public static String getYugaResponseOutput(String str, Map<String,String> config, boolean isTime)