package weaver; import foundation.util.Util; public enum SignType { Both, PartyA, PartyB; public static SignType parse(String code) { if (Util.isEmpty(code)) { return PartyA; } code = code.toLowerCase(); for (SignType signType: SignType.values()) { if (code.equalsIgnoreCase(signType.name())) { return signType; } } return PartyA; } }