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

io.virtdata.libbasics.shared.from_long.to_long.WeightedLongsAutoDocsInfo 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_long.to_long;

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 WeightedLongsAutoDocsInfo implements DocFuncData {
  public String getClassName() {
    return "WeightedLongs";
  }

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

  public String getClassJavadoc() {
    return "Provides a long value from a list of weighted values. The total likelihood\n"
            + "of any value to be produced is proportional to its relative weight in\n"
            + "the total weight of all elements.\n"
            + "\n"
            + "This function automatically hashes the input, so the result is already pseudo-random.\n";
  }

  public String getInType() {
    return "long";
  }

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

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

  public List getCtors() {
    return new ArrayList() {{
          add(new DocForFuncCtor("WeightedLongs", "", 
            new LinkedHashMap() {{
              put("valuesAndWeights","java.lang.String");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("WeightedLongs('1:10;3;5;12345;1");
                add("Yield 1 62.5% of the time, 3 31.25% of the time, and 12345 6.2% of the time");
              }});
            }}
          ));
        }};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy