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

io.nosqlbench.virtdata.library.basics.shared.from_string.MatchFuncAutoDocsInfo Maven / Gradle / Ivy

The newest version!
// This file is auto-generated.
package io.nosqlbench.virtdata.library.basics.shared.from_string;

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

@Service(
    value = DocFuncData.class,
    selector = "io.nosqlbench.virtdata.library.basics.shared.from_string.MatchFunc"
)
public class MatchFuncAutoDocsInfo implements DocFuncData {
  public String getClassName() {
    return "MatchFunc";
  }

  public String getPackageName() {
    return "io.nosqlbench.virtdata.library.basics.shared.from_string";
  }

  public String getClassJavadoc() {
    return "Match any input with a regular expression, and apply the associated\n"
            + "function to it, yielding the value. If no matches occur, then the original\n"
            + "value is passed through unchanged. Patterns and functions are passed as\n"
            + "even,odd pairs indexed from the 0th position. Instead of a function, a\n"
            + "String value may be provided as the associated output value.\n";
  }

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

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

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

  public List getCtors() {
    return new ArrayList() {{
          add(new DocForFuncCtor("MatchFunc", "", 
            new LinkedHashMap() {{
              put("funcs","java.lang.Object[]...");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("MatchFunc('.*','onevalue')");
                add("Match all String inputs, simply returning 'onevalue' as the output value.");
              }});
              add(new ArrayList() {{
                add("MatchFunc('[0-9]+',Suffix('-is-a-number'))");
                add("Append '-is-a-number' to every input which is a sequence of digits");
              }});
            }}
          ));
        }};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy