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

com.ch.status.TestStatus Maven / Gradle / Ivy

package com.ch.status;

import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public enum TestStatus {

	INFO("Info"), PASS("Pass"), WARNING("Warning"), SKIP("Skip"), FAIL("Fail"), ERROR("Error");

	private final String name;
	
	private static final Map ENUM_MAP;

	TestStatus(String name) {
	        this.name = name;
	    }
	public String toLower() {
		return name.toLowerCase();
	}

	@Override
	public String toString() {
		return name;
	}
	
	static {
        Map map = new ConcurrentHashMap();
        for (TestStatus instance : TestStatus.values()) {
            map.put(instance.toLower(),instance);
        }
        ENUM_MAP = Collections.unmodifiableMap(map);
    }

    public static TestStatus get (String name) {
        return ENUM_MAP.get(name);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy