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

com.rosetta.jptlegalagreement.model.RegulatoryRegimeEnum Maven / Gradle / Ivy

There is a newer version: 11.25.1
Show newest version
package com.rosetta.jptlegalagreement.model;

import com.rosetta.jptlegalagreement.model.RegulatoryRegimeEnum;
import com.rosetta.model.lib.annotations.RosettaEnum;
import com.rosetta.model.lib.annotations.RosettaEnumValue;
import com.rosetta.model.lib.annotations.RosettaSynonym;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


/**
 * @version test
 */
@RosettaEnum("RegulatoryRegimeEnum")
public enum RegulatoryRegimeEnum {

	@RosettaSynonym(value = "APRA", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "AustraliaMarginRules", displayName = "Australia") 
	AUSTRALIA_MARGIN_RULES("AustraliaMarginRules", "Australia"),
	
	@RosettaSynonym(value = "OSFI", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "CanadaMarginRules", displayName = "Canada") 
	CANADA_MARGIN_RULES("CanadaMarginRules", "Canada"),
	
	@RosettaSynonym(value = "CFTC", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "CFTC_MarginRules", displayName = "CFTC") 
	CFTC_MARGIN_RULES("CFTC_MarginRules", "CFTC"),
	
	@RosettaEnumValue(value = "EMIR_MarginRules", displayName = "EMIR") 
	EMIR_MARGIN_RULES("EMIR_MarginRules", "EMIR"),
	
	@RosettaSynonym(value = "HKMA", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "HongKongMarginRules", displayName = "Hong Kong") 
	HONG_KONG_MARGIN_RULES("HongKongMarginRules", "Hong Kong"),
	
	@RosettaSynonym(value = "JFSA", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "JapanMarginRules", displayName = "Japan") 
	JAPAN_MARGIN_RULES("JapanMarginRules", "Japan"),
	
	@RosettaSynonym(value = "USPR", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "US_PrudentialMarginRules", displayName = "Prudential") 
	US_PRUDENTIAL_MARGIN_RULES("US_PrudentialMarginRules", "Prudential"),
	
	@RosettaSynonym(value = "SEC", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "SEC_MarginRules", displayName = "SEC") 
	SEC_MARGIN_RULES("SEC_MarginRules", "SEC"),
	
	@RosettaSynonym(value = "MAS", source = "ISDA_Create_1_0")
	@RosettaEnumValue(value = "SingaporeMarginRules", displayName = "Singapore") 
	SINGAPORE_MARGIN_RULES("SingaporeMarginRules", "Singapore"),
	
	@RosettaEnumValue(value = "SwitzerlandMarginRules", displayName = "Switzerland") 
	SWITZERLAND_MARGIN_RULES("SwitzerlandMarginRules", "Switzerland")
;
	private static Map values;
	static {
        Map map = new ConcurrentHashMap<>();
		for (RegulatoryRegimeEnum instance : RegulatoryRegimeEnum.values()) {
			map.put(instance.toDisplayString(), instance);
		}
		values = Collections.unmodifiableMap(map);
    }

	private final String rosettaName;
	private final String displayName;

	RegulatoryRegimeEnum(String rosettaName, String displayName) {
		this.rosettaName = rosettaName;
		this.displayName = displayName;
	}

	public static RegulatoryRegimeEnum fromDisplayName(String name) {
		RegulatoryRegimeEnum value = values.get(name);
		if (value == null) {
			throw new IllegalArgumentException("No enum constant with display name \"" + name + "\".");
		}
		return value;
	}

	@Override
	public String toString() {
		return toDisplayString();
	}

	public String toDisplayString() {
		return displayName != null ?  displayName : rosettaName;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy