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

com.aventstack.extentreports.AttribStatusDist Maven / Gradle / Ivy

There is a newer version: 5.1.2
Show newest version
package com.aventstack.extentreports;

import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

import com.aventstack.extentreports.model.NamedAttribute;
import com.aventstack.extentreports.model.context.NamedAttributeContext;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class AttribStatusDist {
    private String name;
    private Map dist = new HashMap<>();

    public AttribStatusDist(NamedAttributeContext context) {
        name = context.getAttr().getName();
        dist = context.getStatusDist().entrySet()
                .stream()
                .collect(Collectors.toMap(e -> e.getKey().toLower(), e -> e.getValue()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy