Search in sources :

Example 1 with OptionGroup

use of org.hisp.dhis.option.OptionGroup in project dhis2-core by dhis2.

the class AbstractWebApiTest method createTestObject.

@SuppressWarnings("unchecked")
protected T createTestObject(Class<?> clazz, char uniqueName, Object... params) {
    if (DataElementGroup.class.isAssignableFrom(clazz)) {
        return (T) createDataElementGroup(uniqueName);
    } else if (DataElementCategoryCombo.class.isAssignableFrom(clazz)) {
        return (T) createCategoryCombo(uniqueName, Arrays.copyOf(params, params.length, DataElementCategory[].class));
    } else if (DataElementCategoryOption.class.isAssignableFrom(clazz)) {
        return (T) createCategoryOption(uniqueName);
    } else if (DataElement.class.isAssignableFrom(clazz)) {
        return (T) createDataElement(uniqueName);
    } else if (DataElementCategory.class.isAssignableFrom(clazz)) {
        return (T) createDataElementCategory(uniqueName, Arrays.copyOf(params, params.length, DataElementCategoryOption[].class));
    } else if (Program.class.isAssignableFrom(clazz)) {
        OrganisationUnit organisationUnitA = createOrganisationUnit(uniqueName);
        manager.save(organisationUnitA);
        return (T) createProgram(uniqueName, new HashSet<>(), organisationUnitA);
    } else if (DataElementOperand.class.isAssignableFrom(clazz)) {
        DataElement deA = createDataElement(uniqueName);
        manager.save(deA);
        DataElementCategoryCombo cc = createCategoryCombo(uniqueName);
        DataElementCategoryOption co = createCategoryOption(uniqueName);
        manager.save(cc);
        manager.save(co);
        DataElementCategoryOptionCombo coc = createCategoryOptionCombo(cc, co);
        manager.save(coc);
        return (T) new DataElementOperand(deA, coc);
    } else if (DataElementGroupSet.class.isAssignableFrom(clazz)) {
        return (T) createDataElementGroupSet(uniqueName);
    } else if (DataElementCategoryOptionCombo.class.isAssignableFrom(clazz)) {
        DataElementCategoryCombo cc = createCategoryCombo(uniqueName);
        DataElementCategoryOption co = createCategoryOption(uniqueName);
        manager.save(cc);
        manager.save(co);
        return (T) createCategoryOptionCombo(cc, co);
    } else if (CategoryOptionGroup.class.isAssignableFrom(clazz)) {
        DataElementCategoryOption co = createCategoryOption(uniqueName);
        manager.save(co);
        return (T) createCategoryOptionGroup(uniqueName, co);
    } else if (CategoryOptionGroupSet.class.isAssignableFrom(clazz)) {
        return (T) createCategoryOptionGroupSet(uniqueName);
    } else if (EventChart.class.isAssignableFrom(clazz)) {
        Program prA = createProgram(uniqueName);
        manager.save(prA);
        EventChart ecA = new EventChart("evc" + uniqueName);
        ecA.setProgram(prA);
        ecA.setType(ChartType.COLUMN);
        return (T) ecA;
    } else if (EventReport.class.isAssignableFrom(clazz)) {
        Program prA = createProgram(uniqueName);
        manager.save(prA);
        EventReport erA = new EventReport("er" + uniqueName);
        erA.setProgram(prA);
        return (T) erA;
    } else if (ProgramDataElementDimensionItem.class.isAssignableFrom(clazz)) {
        Program prA = createProgram(uniqueName);
        manager.save(prA);
        DataElement deA = createDataElement(uniqueName);
        manager.save(deA);
        return (T) new ProgramDataElementDimensionItem(prA, deA);
    } else if (ProgramIndicator.class.isAssignableFrom(clazz)) {
        Program program = (Program) createTestObject(Program.class, uniqueName);
        manager.save(program);
        Constant constantA = createConstant(uniqueName, 7.0);
        manager.save(constantA);
        String expressionA = "( " + KEY_PROGRAM_VARIABLE + "{" + ProgramIndicator.VAR_ENROLLMENT_DATE + "} - " + KEY_PROGRAM_VARIABLE + "{" + ProgramIndicator.VAR_INCIDENT_DATE + "} )  / " + ProgramIndicator.KEY_CONSTANT + "{" + constantA.getUid() + "}";
        return (T) createProgramIndicator(uniqueName, program, expressionA, null);
    } else if (Indicator.class.isAssignableFrom(clazz)) {
        IndicatorType indicatorType = createIndicatorType(uniqueName);
        manager.save(indicatorType);
        return (T) createIndicator(uniqueName, indicatorType);
    } else if (IndicatorGroup.class.isAssignableFrom(clazz)) {
        return (T) createIndicatorGroup(uniqueName);
    } else if (IndicatorGroupSet.class.isAssignableFrom(clazz)) {
        return (T) createIndicatorGroupSet(uniqueName);
    } else if (IndicatorType.class.isAssignableFrom(clazz)) {
        return (T) createIndicatorType(uniqueName);
    } else if (Legend.class.isAssignableFrom(clazz)) {
        return (T) createLegend(uniqueName, 0d, 10d);
    } else if (LegendSet.class.isAssignableFrom(clazz)) {
        return (T) createLegendSet(uniqueName);
    } else if (OrganisationUnit.class.isAssignableFrom(clazz)) {
        return (T) createOrganisationUnit(uniqueName);
    } else if (OrganisationUnitGroup.class.isAssignableFrom(clazz)) {
        return (T) createOrganisationUnitGroup(uniqueName);
    } else if (OrganisationUnitGroupSet.class.isAssignableFrom(clazz)) {
        return (T) createOrganisationUnitGroupSet(uniqueName);
    } else if (OrganisationUnitLevel.class.isAssignableFrom(clazz)) {
        return (T) new OrganisationUnitLevel(uniqueName, "OrgLevel" + uniqueName);
    } else if (Color.class.isAssignableFrom(clazz)) {
        Color color = new Color("#ff3200");
        color.setName("Color" + uniqueName);
        return (T) color;
    } else if (ColorSet.class.isAssignableFrom(clazz)) {
        ColorSet colorSet = new ColorSet();
        colorSet.setName("ColorSet" + uniqueName);
        return (T) colorSet;
    } else if (org.hisp.dhis.mapping.Map.class.isAssignableFrom(clazz)) {
        org.hisp.dhis.mapping.Map map = new org.hisp.dhis.mapping.Map();
        map.setName("Map" + uniqueName);
        map.setDisplayName("DisplayName" + uniqueName);
        map.setLatitude(952175.62553525);
        map.setLongitude(-1378543.6774686);
        return (T) map;
    } else if (ExternalMapLayer.class.isAssignableFrom(clazz)) {
        ExternalMapLayer externalMapLayer = new ExternalMapLayer("ExternalMapLayer" + uniqueName);
        externalMapLayer.setMapService(MapService.WMS);
        externalMapLayer.setUrl("testUrl");
        externalMapLayer.setImageFormat(ImageFormat.JPG);
        externalMapLayer.setMapLayerPosition(MapLayerPosition.BASEMAP);
        return (T) externalMapLayer;
    } else if (OptionGroup.class.isAssignableFrom(clazz)) {
        OptionGroup optionGroup = new OptionGroup("OptionGroup" + uniqueName);
        optionGroup.setShortName("Group" + uniqueName);
        return (T) optionGroup;
    } else if (OptionGroupSet.class.isAssignableFrom(clazz)) {
        return (T) new OptionGroupSet("OptionGroupSet" + uniqueName);
    } else if (Option.class.isAssignableFrom(clazz)) {
        return (T) new Option("Option" + uniqueName, "code" + uniqueName);
    } else if (OptionSet.class.isAssignableFrom(clazz)) {
        return (T) new OptionSet("OptionSet" + uniqueName, ValueType.TEXT);
    } else if (ProgramTrackedEntityAttributeGroup.class.isAssignableFrom(clazz)) {
        ProgramTrackedEntityAttributeGroup group = createProgramTrackedEntityAttributeGroup(uniqueName);
        ProgramTrackedEntityAttribute attr = createProgramTrackedEntityAttribute(uniqueName);
        group.addAttribute(attr);
        return (T) group;
    } else if (ProgramTrackedEntityAttribute.class.isAssignableFrom(clazz)) {
        return (T) createProgramTrackedEntityAttribute(uniqueName);
    } else if (ProgramDataElementDimensionItem.class.isAssignableFrom(clazz)) {
        return (T) createProgramDataElement(uniqueName);
    }
    return null;
}
Also used : ColorSet(org.hisp.dhis.color.ColorSet) OptionGroupSet(org.hisp.dhis.option.OptionGroupSet) CategoryOptionGroupSet(org.hisp.dhis.dataelement.CategoryOptionGroupSet) ExternalMapLayer(org.hisp.dhis.mapping.ExternalMapLayer) Legend(org.hisp.dhis.legend.Legend) DataElementCategoryCombo(org.hisp.dhis.dataelement.DataElementCategoryCombo) Constant(org.hisp.dhis.constant.Constant) EventReport(org.hisp.dhis.eventreport.EventReport) DataElement(org.hisp.dhis.dataelement.DataElement) CategoryOptionGroup(org.hisp.dhis.dataelement.CategoryOptionGroup) IndicatorType(org.hisp.dhis.indicator.IndicatorType) OptionGroup(org.hisp.dhis.option.OptionGroup) CategoryOptionGroup(org.hisp.dhis.dataelement.CategoryOptionGroup) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) Program(org.hisp.dhis.program.Program) Color(org.hisp.dhis.color.Color) EventChart(org.hisp.dhis.eventchart.EventChart) ProgramIndicator(org.hisp.dhis.program.ProgramIndicator) Indicator(org.hisp.dhis.indicator.Indicator) DataElementGroupSet(org.hisp.dhis.dataelement.DataElementGroupSet) ProgramDataElementDimensionItem(org.hisp.dhis.program.ProgramDataElementDimensionItem) IndicatorGroupSet(org.hisp.dhis.indicator.IndicatorGroupSet) DataElementCategoryOption(org.hisp.dhis.dataelement.DataElementCategoryOption) ProgramTrackedEntityAttribute(org.hisp.dhis.program.ProgramTrackedEntityAttribute) OrganisationUnitLevel(org.hisp.dhis.organisationunit.OrganisationUnitLevel) DataElementCategoryOption(org.hisp.dhis.dataelement.DataElementCategoryOption) Option(org.hisp.dhis.option.Option) ProgramTrackedEntityAttributeGroup(org.hisp.dhis.program.ProgramTrackedEntityAttributeGroup) OptionSet(org.hisp.dhis.option.OptionSet) Map(java.util.Map) DataElementCategoryOptionCombo(org.hisp.dhis.dataelement.DataElementCategoryOptionCombo) OrganisationUnitGroupSet(org.hisp.dhis.organisationunit.OrganisationUnitGroupSet)

Example 2 with OptionGroup

use of org.hisp.dhis.option.OptionGroup in project dhis2-core by dhis2.

the class DefaultCsvImportService method optionGroupSetMembersFromCsv.

/**
 * Option Group Set Members format
 * <ul>
 * <li>option group set uid</li>
 * <li>option group uid</li>
 * </ul>
 */
public List<OptionGroupSet> optionGroupSetMembersFromCsv(CsvReader reader) throws IOException {
    Map<String, OptionGroupSet> uidMap = new HashMap<>();
    Map<String, OptionGroupSet> persistedGroupSetMap = new HashMap<>();
    while (reader.readRecord()) {
        String[] values = reader.getValues();
        if (values != null && values.length > 0) {
            String groupSetUid = getSafe(values, 0, 11);
            String groupUid = getSafe(values, 1, 11);
            if (groupSetUid == null || groupUid == null) {
                continue;
            }
            OptionGroupSet persistedGroupSet = persistedGroupSetMap.computeIfAbsent(groupSetUid, key -> optionService.getOptionGroupSet(key));
            if (persistedGroupSet != null) {
                OptionGroupSet optionSetGroup = uidMap.computeIfAbsent(groupSetUid, key -> {
                    OptionGroupSet nonPersistedGroup = new OptionGroupSet();
                    nonPersistedGroup.setAutoFields();
                    nonPersistedGroup.setUid(persistedGroupSet.getUid());
                    nonPersistedGroup.setName(persistedGroupSet.getName());
                    return nonPersistedGroup;
                });
                OptionGroup member = new OptionGroup();
                member.setAutoFields();
                member.setUid(groupUid);
                optionSetGroup.addOptionGroup(member);
            }
        }
    }
    return new ArrayList<>(uidMap.values());
}
Also used : OptionGroupSet(org.hisp.dhis.option.OptionGroupSet) OptionGroup(org.hisp.dhis.option.OptionGroup) CategoryOptionGroup(org.hisp.dhis.category.CategoryOptionGroup) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList)

Example 3 with OptionGroup

use of org.hisp.dhis.option.OptionGroup in project dhis2-core by dhis2.

the class DefaultCsvImportService method setOptionGroupsFromCsv.

/**
 * Option group format:
 * <p>
 * <ul>
 * <li>option group name</li>
 * <li>option group uid</li>
 * <li>option group code</li>
 * <li>option group short name</li>
 * <li>option set uid</li>
 * <li>option uid</li>
 * </ul>
 */
private void setOptionGroupsFromCsv(CsvReader reader, Metadata metadata) throws IOException {
    ListMap<String, Option> nameOptionMap = new ListMap<>();
    Map<String, OptionGroup> nameOptionGroupMap = new HashMap<>();
    Map<String, OptionSet> mapOptionSet = new HashMap<>();
    while (reader.readRecord()) {
        String[] values = reader.getValues();
        if (values != null && values.length > 0) {
            OptionGroup optionGroup = new OptionGroup();
            setIdentifiableObject(optionGroup, values);
            optionGroup.setShortName(getSafe(values, 3, 50));
            optionGroup.setAutoFields();
            if (optionGroup.getName() == null || optionGroup.getShortName() == null) {
                continue;
            }
            OptionSet optionSet = new OptionSet();
            optionSet.setUid(getSafe(values, 4, 11));
            if (optionSet.getUid() == null) {
                continue;
            }
            OptionSet persistedOptionSet = optionSet.getUid() != null ? mapOptionSet.computeIfAbsent(optionSet.getUid(), key -> optionService.getOptionSet(optionSet.getUid())) : mapOptionSet.computeIfAbsent(optionSet.getCode(), key -> optionService.getOptionSetByCode(optionSet.getCode()));
            if (persistedOptionSet == null) {
                continue;
            }
            optionGroup.setOptionSet(optionSet);
            Option option = new Option();
            option.setUid(getSafe(values, 5, 11));
            option.setCode(getSafe(values, 6, 50));
            if (option.getCode() == null && option.getUid() == null) {
                continue;
            }
            Optional<Option> isOptionExisted = persistedOptionSet.getOptions().stream().filter(persistedOption -> {
                if (option.getUid() != null) {
                    return persistedOption.getUid().equals(option.getUid());
                } else {
                    return persistedOption.getCode().equals(option.getCode());
                }
            }).findFirst();
            if (!isOptionExisted.isPresent()) {
                continue;
            }
            nameOptionGroupMap.put(optionGroup.getName(), optionGroup);
            nameOptionMap.putValue(optionGroup.getName(), isOptionExisted.get());
        }
    }
    // Read option groups from map and set in meta data
    for (Entry<String, OptionGroup> optionGroupEntry : nameOptionGroupMap.entrySet()) {
        optionGroupEntry.getValue().setMembers(new HashSet<>(nameOptionMap.get(optionGroupEntry.getKey())));
    }
    metadata.setOptionGroups(new ArrayList<>(nameOptionGroupMap.values()));
}
Also used : CategoryService(org.hisp.dhis.category.CategoryService) Importance(org.hisp.dhis.validation.Importance) CategoryOption(org.hisp.dhis.category.CategoryOption) ValueType(org.hisp.dhis.common.ValueType) StringUtils(org.apache.commons.lang3.StringUtils) OptionGroup(org.hisp.dhis.option.OptionGroup) MonthlyPeriodType(org.hisp.dhis.period.MonthlyPeriodType) Metadata(org.hisp.dhis.dxf2.metadata.Metadata) Map(java.util.Map) IndicatorGroup(org.hisp.dhis.indicator.IndicatorGroup) OrganisationUnitGroupService(org.hisp.dhis.organisationunit.OrganisationUnitGroupService) BaseIdentifiableObject(org.hisp.dhis.common.BaseIdentifiableObject) OrganisationUnitGroup(org.hisp.dhis.organisationunit.OrganisationUnitGroup) OptionGroupSet(org.hisp.dhis.option.OptionGroupSet) Category(org.hisp.dhis.category.Category) Operator(org.hisp.dhis.expression.Operator) DataElementGroupService(org.hisp.dhis.dataelement.DataElementGroupService) List(java.util.List) IndicatorGroupService(org.hisp.dhis.indicator.IndicatorGroupService) Entry(java.util.Map.Entry) CsvReader(com.csvreader.CsvReader) Optional(java.util.Optional) CategoryCombo(org.hisp.dhis.category.CategoryCombo) DataDimensionType(org.hisp.dhis.common.DataDimensionType) ListMap(org.hisp.dhis.common.ListMap) DateUtils.getMediumDate(org.hisp.dhis.util.DateUtils.getMediumDate) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) DataElement(org.hisp.dhis.dataelement.DataElement) MissingValueStrategy(org.hisp.dhis.expression.MissingValueStrategy) Service(org.springframework.stereotype.Service) Indicator(org.hisp.dhis.indicator.Indicator) CategoryOptionGroup(org.hisp.dhis.category.CategoryOptionGroup) OptionService(org.hisp.dhis.option.OptionService) CsvUtils(org.hisp.dhis.system.util.CsvUtils) DataElementDomain(org.hisp.dhis.dataelement.DataElementDomain) AggregationType(org.hisp.dhis.analytics.AggregationType) IOException(java.io.IOException) ValidationRule(org.hisp.dhis.validation.ValidationRule) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Option(org.hisp.dhis.option.Option) FeatureType(org.hisp.dhis.organisationunit.FeatureType) OptionSet(org.hisp.dhis.option.OptionSet) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) PeriodType(org.hisp.dhis.period.PeriodType) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Expression(org.hisp.dhis.expression.Expression) AllArgsConstructor(lombok.AllArgsConstructor) DataElementGroup(org.hisp.dhis.dataelement.DataElementGroup) InputStream(java.io.InputStream) HashMap(java.util.HashMap) ListMap(org.hisp.dhis.common.ListMap) OptionGroup(org.hisp.dhis.option.OptionGroup) CategoryOptionGroup(org.hisp.dhis.category.CategoryOptionGroup) CategoryOption(org.hisp.dhis.category.CategoryOption) Option(org.hisp.dhis.option.Option) OptionSet(org.hisp.dhis.option.OptionSet)

Example 4 with OptionGroup

use of org.hisp.dhis.option.OptionGroup in project dhis2-core by dhis2.

the class ShowHideOptionGroupProgramRuleActionValidator method validate.

@Override
public ProgramRuleActionValidationResult validate(ProgramRuleAction programRuleAction, ProgramRuleActionValidationContext validationContext) {
    ProgramRule rule = validationContext.getProgramRule();
    // First checking the validity of DataElement and TEA
    ProgramRuleActionValidationResult result = super.validate(programRuleAction, validationContext);
    if (!result.isValid()) {
        return result;
    }
    if (!programRuleAction.hasOptionGroup()) {
        log.debug(String.format("OptionGroup cannot be null for program rule: %s ", rule.getName()));
        return ProgramRuleActionValidationResult.builder().valid(false).errorReport(new ErrorReport(Option.class, ErrorCode.E4040, rule.getName())).build();
    }
    OptionGroup optionGroup = validationContext.getOptionGroup();
    if (optionGroup == null) {
        optionGroup = validationContext.getProgramRuleActionValidationService().getOptionService().getOptionGroup(programRuleAction.getOptionGroup().getUid());
    }
    if (optionGroup == null) {
        log.debug(String.format("OptionGroup: %s associated with program rule: %s does not exist", programRuleAction.getOptionGroup().getUid(), rule.getName()));
        return ProgramRuleActionValidationResult.builder().valid(false).errorReport(new ErrorReport(Option.class, ErrorCode.E4043, programRuleAction.getOptionGroup().getUid(), rule.getName())).build();
    }
    return ProgramRuleActionValidationResult.builder().valid(true).build();
}
Also used : ErrorReport(org.hisp.dhis.feedback.ErrorReport) ProgramRuleActionValidationResult(org.hisp.dhis.programrule.ProgramRuleActionValidationResult) OptionGroup(org.hisp.dhis.option.OptionGroup) ProgramRule(org.hisp.dhis.programrule.ProgramRule)

Example 5 with OptionGroup

use of org.hisp.dhis.option.OptionGroup in project dhis2-core by dhis2.

the class CsvMetadataImportTest method testImportOptionGroupSet.

@Test
void testImportOptionGroupSet() throws IOException {
    ImportReport importReport = runImport("metadata/option_set.csv", CsvImportClass.OPTION_SET);
    assertEquals(5, importReport.getStats().getCreated());
    OptionSet optionSetA = manager.get(OptionSet.class, "xmRubJIhmaK");
    assertNotNull(optionSetA);
    assertEquals(2, optionSetA.getOptions().size());
    OptionSet optionSetB = manager.get(OptionSet.class, "QYDAByFgTr1");
    assertNotNull(optionSetB);
    assertEquals(1, optionSetB.getOptions().size());
    importReport = runImport("metadata/option_groups.csv", CsvImportClass.OPTION_GROUP);
    assertEquals(2, importReport.getStats().getCreated());
    OptionGroup optionGroupA = manager.get(OptionGroup.class, "UeHtizvXbx6");
    assertNotNull(optionGroupA);
    assertEquals(2, optionGroupA.getMembers().size());
    OptionGroup optionGroupB = manager.get(OptionGroup.class, "EVYjFX6Ez0a");
    assertNotNull(optionGroupB);
    assertEquals(1, optionGroupB.getMembers().size());
    importReport = runImport("metadata/option_group_set.csv", CsvImportClass.OPTION_GROUP_SET);
    assertEquals(2, importReport.getStats().getCreated());
    OptionGroupSet optionGroupSetA = manager.get(OptionGroupSet.class, "FB9i0Jl2R80");
    assertNotNull(optionGroupSetA);
    OptionGroupSet optionGroupSetB = manager.get(OptionGroupSet.class, "K30djctzUtN");
    assertNotNull(optionGroupSetB);
    importReport = runImport("metadata/option_group_set_members.csv", CsvImportClass.OPTION_GROUP_SET_MEMBERSHIP);
    assertEquals(2, importReport.getStats().getUpdated());
    OptionGroupSet ogsA = optionService.getOptionGroupSet("FB9i0Jl2R80");
    OptionGroupSet ogsB = optionService.getOptionGroupSet("K30djctzUtN");
    assertEquals(1, ogsA.getMembers().size());
    assertEquals(1, ogsB.getMembers().size());
    assertEquals(2, ogsA.getMembers().get(0).getMembers().size());
}
Also used : OptionGroupSet(org.hisp.dhis.option.OptionGroupSet) OptionGroup(org.hisp.dhis.option.OptionGroup) ImportReport(org.hisp.dhis.dxf2.metadata.feedback.ImportReport) OptionSet(org.hisp.dhis.option.OptionSet) Test(org.junit.jupiter.api.Test) DhisSpringTest(org.hisp.dhis.DhisSpringTest)

Aggregations

OptionGroup (org.hisp.dhis.option.OptionGroup)5 OptionGroupSet (org.hisp.dhis.option.OptionGroupSet)4 OptionSet (org.hisp.dhis.option.OptionSet)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 CategoryOptionGroup (org.hisp.dhis.category.CategoryOptionGroup)2 DataElement (org.hisp.dhis.dataelement.DataElement)2 Indicator (org.hisp.dhis.indicator.Indicator)2 Option (org.hisp.dhis.option.Option)2 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)2 CsvReader (com.csvreader.CsvReader)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Entry (java.util.Map.Entry)1 Optional (java.util.Optional)1 Supplier (java.util.function.Supplier)1 AllArgsConstructor (lombok.AllArgsConstructor)1