create Tags in StringCompressor instead of use StringCompressor in Tags

This commit is contained in:
2021-08-25 20:00:31 +02:00
parent b01567c82e
commit 5d2fdb4820
8 changed files with 171 additions and 109 deletions

View File

@@ -7,6 +7,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.lucares.pdb.api.StringCompressor;
import org.lucares.pdb.api.Tag;
import org.lucares.pdb.api.Tags;
import org.lucares.pdb.api.TagsBuilder;
import org.lucares.pdb.api.UniqueStringIntegerPairs;
@@ -72,23 +73,23 @@ public class MemoryScale {
}
}
private static Object createTag() {
private static Tag createTag() {
return Tags.STRING_COMPRESSOR.createTag("", "");
}
private static Object createTags0() {
private static Tags createTags0() {
return new Tags();
}
private static Object createTags1() {
return Tags.createAndAddToDictionary("k1", "v1");
private static Tags createTags1() {
return Tags.STRING_COMPRESSOR.createAndAddToDictionary("k1", "v1");
}
private static Object createTags2() {
return Tags.createAndAddToDictionary("k1", "v1", "k2", "v2");
private static Tags createTags2() {
return Tags.STRING_COMPRESSOR.createAndAddToDictionary("k1", "v1", "k2", "v2");
}
private static Object createTags6() {
private static Tags createTags6() {
final TagsBuilder result = TagsBuilder.create();
result.add(Tags.STRING_COMPRESSOR.createTag("k1", "v1"));