Tabnine Logo
OrgDelay.setTypeFromString
Code IndexAdd Tabnine to your IDE (free)

How to use
setTypeFromString
method
in
com.orgzly.org.datetime.OrgDelay

Best Java code snippets using com.orgzly.org.datetime.OrgDelay.setTypeFromString (Showing top 1 results out of 315)

origin: orgzly/org-java

public static OrgDelay parse(String str) {
  OrgDelay delay = new OrgDelay();
  Matcher m = OrgPatterns.TIME_DELAY_P.matcher(str);
  if (m.find()) {
    if (m.groupCount() == 3) {
      delay.setTypeFromString(m.group(1));
      delay.setValue(m.group(2));
      delay.setUnit(m.group(3));
    } else {
      throw new IllegalArgumentException("Expected 3 groups (got " + m.groupCount() + ") when matching time delay " + str + " against " + OrgPatterns.TIME_DELAY_P);
    }
  } else {
    throw new IllegalArgumentException("Failed matching time delay " + str + " against " + OrgPatterns.TIME_DELAY_P);
  }
  return delay;
}
com.orgzly.org.datetimeOrgDelaysetTypeFromString

Popular methods of OrgDelay

  • <init>
  • getType
  • getUnit
  • getValue
  • parse
  • setUnit
  • setValue

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JLabel (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now