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

io.virtdata.libbasics.shared.from_long.to_collection.StringMapAutoDocsInfo 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_collection;

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

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

  public String getClassJavadoc() {
    return "Create a {@code Map} from a long input\n"
            + "based on three functions,\n"
            + "the first to determine the map size, and the second to populate\n"
            + "the map with key objects, and the third to populate the map with\n"
            + "value objects. The long input fed to the second and third functions\n"
            + "is incremented between entries. Regardless of the object type provided\n"
            + "by the second and third functions, {@link java.lang.Object#toString()}\n"
            + "is used to determine the key and value to add to the map.\n"
            + "\n"
            + "To create Maps of any key and value types, simply use {@link Map} with\n"
            + "an specific key and value mapping functions.\n";
  }

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

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

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

  public List getCtors() {
    return new ArrayList() {{
          add(new DocForFuncCtor("StringMap", "", 
            new LinkedHashMap() {{
              put("sizeFunc","java.util.function.LongToIntFunction");
              put("keyFunc","java.util.function.LongFunction");
              put("valueFunc","java.util.function.LongFunction");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("StringMap(HashRange(3,7),NumberNameToString(),HashRange(1300,1700))");
                add("create a map of size 3-7 entries, with a key of type string and a value of type int (Integer by autoboxing)");
              }});
            }}
          ));
          add(new DocForFuncCtor("StringMap", "", 
            new LinkedHashMap() {{
              put("objfuncs","java.util.function.LongFunction[]...");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("StringMap(NumberNameToString(),HashRange(1300,1700),NumberNameToString(),HashRange(3,7))");
                add("create a map of size 2, with a specific function for each key and each value");
              }});
            }}
          ));
        }};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy