blob: bb567ae8a375ec192bbfc667506a9fd48194bc08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package org.openecomp.sdc.be.datatypes.enums;
import java.util.stream.Stream;
public enum InstantiationTypes {
A_LA_CARTE("A-la-carte"),
MACRO("Macro");
private String value;
private InstantiationTypes(String value) {
this.value = value;
}
public String getValue() {
return value;
}
/**
* Checks if enum with the given type exists.
*
* @param type
* @return bool
*/
public static boolean containsName(String type) {
return Stream.of(InstantiationTypes.values())
.anyMatch(instType -> type.equals(instType.getValue()));
}
}
|