export class EnumUtils {

    public static hasFlag(obj: number, enumValue: number): boolean {
        if (obj) {
            if (obj & enumValue) {
                return true;
            }
        }
        return false;
    }

    public static GetAllEnumValue(enumType: any): number[] {
        return Object
            .keys(enumType)
            .filter((v) => !isNaN(Number(v)))
            .map(v => Number.parseInt(v));
    }
}
