All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.virtdata.libbasics.shared.from_string.MatchRegexAutoDocsInfo Maven / Gradle / Ivy

There is a newer version: 2.12.15
Show newest version
// This file is auto-generated.
package io.virtdata.libbasics.shared.from_string;

import io.virtdata.annotations.Category;
import io.virtdata.annotations.Service;
import io.virtdata.processors.DocCtorData;
import io.virtdata.processors.DocForFuncCtor;
import io.virtdata.processors.DocFuncData;
import java.lang.String;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

@Service(DocFuncData.class)
public class MatchRegexAutoDocsInfo implements DocFuncData {
  public String getClassName() {
    return "MatchRegex";
  }

  public String getPackageName() {
    return "io.virtdata.libbasics.shared.from_string";
  }

  public String getClassJavadoc() {
    return "Match any input with a regular expression, and apply the associated\n"
            + "regex replacement to it, yielding the value.\n"
            + "If no matches occur, then the original value is passed through unchanged.\n"
            + "Patterns and replacements are passed as even,odd pairs indexed from the\n"
            + "0th position. Back-references to matching groups are supported.\n"
            + "\n";
  }

  public String getInType() {
    return "java.lang.String";
  }

  public String getOutType() {
    return "java.lang.String";
  }

  public Category[] getCategories() {
    return new Category[] {  };
  }

  public List getCtors() {
    return new ArrayList() {{
          add(new DocForFuncCtor("MatchRegex", "", 
            new LinkedHashMap() {{
              put("specs","java.lang.String[]...");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("MatchRegex('.*(25|6to4).*','$1')");
                add("Match 25 or 6 to 4 and set the output to only that");
              }});
              add(new ArrayList() {{
                add("MatchRegex('([0-9]+)-([0-9]+)-([0-9]+)','$1 $2 $3'");
                add("replaced dashes with spaces in a 10 digit US phone number.");
              }});
            }}
          ));
        }};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy