public static HdfsServerConstants.StartupOption GetEnum(string value) { Matcher matcher = HdfsServerConstants.StartupOption.EnumWithRollingUpgradeOption. Matcher(value); if (matcher.Matches()) { HdfsServerConstants.StartupOption option = HdfsServerConstants.StartupOption.ValueOf (matcher.Group(1)); option.SetRollingUpgradeStartupOption(matcher.Group(2)); return(option); } else { return(HdfsServerConstants.StartupOption.ValueOf(value)); } }
public bool Matches(HdfsServerConstants.StartupOption option) { return(option == HdfsServerConstants.StartupOption.Rollingupgrade && option.GetRollingUpgradeStartupOption () == this); }