io.virtdata.libbasics.shared.from_long.to_uuid.ToUUIDAutoDocsInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
// This file is auto-generated.
package io.virtdata.libbasics.shared.from_long.to_uuid;
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 ToUUIDAutoDocsInfo implements DocFuncData {
public String getClassName() {
return "ToUUID";
}
public String getPackageName() {
return "io.virtdata.libbasics.shared.from_long.to_uuid";
}
public String getClassJavadoc() {
return "This function creates a non-random UUID in the type 4 version (Random).\n"
+ "It always puts the same value in the MSB position of the UUID format.\n"
+ "The input value is put in the LSB position.\n"
+ "\n"
+ "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx\n"
+ "mmmmmmmm-mmmm-Mmmm-Llll-llllllllllll\n"
+ " 4 3\n"
+ "
\n"
+ "As shown above, the LSB position does not have the complication of having\n"
+ "a version identifier (position M) dividing the dynamic range of the data type.\n"
+ "For this reason, only the LSB side is used for this mapper, which allows\n"
+ "an effective range of Long.MAX_VALUE/8, given the loss of 3 digits of precision.\n"
+ "\n"
+ "This function is suitable for deterministic testing of scenarios which depend\n"
+ "on type 4 UUIDs, but without the mandated randomness that makes testing difficult.\n"
+ "Just be aware that the MSB will always contain value 0x0123456789ABCDEFL unless you\n"
+ "specify a different long value to pre-fill it with.\n";
}
public String getInType() {
return "long";
}
public String getOutType() {
return "java.util.UUID";
}
public Category[] getCategories() {
return new Category[] { };
}
public List getCtors() {
return new ArrayList() {{
add(new DocForFuncCtor("ToUUID", "",
new LinkedHashMap() {{
}},
new ArrayList>() {{
}}
));
add(new DocForFuncCtor("ToUUID", "",
new LinkedHashMap() {{
put("msbs","long");
}},
new ArrayList>() {{
}}
));
}};
}
}