protected RuleTypeEnum typeCheck(Object value) throws DmcValueException {
    RuleTypeEnum rc = null;

    if (value instanceof RuleTypeEnum) {
      rc = (RuleTypeEnum) value;
    } else if (value instanceof String) {
      rc = RuleTypeEnum.get((String) value);
      if (rc == null) {
        throw (new DmcValueException(
            "Value: " + value.toString() + " is not a valid RuleTypeEnum value."));
      }
    } else if (value instanceof Integer) {
      rc = RuleTypeEnum.get((Integer) value);
      if (rc == null) {
        throw (new DmcValueException(
            "Value: " + value.toString() + " is not a valid RuleTypeEnum value."));
      }
    } else {
      throw (new DmcValueException(
          "Object of class: "
              + value.getClass().getName()
              + " passed where object compatible with RuleTypeEnum expected."));
    }
    return (rc);
  }
 /** Reads a RuleTypeEnum. */
 @Override
 public RuleTypeEnum deserializeValue(DmcInputStreamIF dis) throws Exception {
   return (RuleTypeEnum.get(dis.readShort()));
 }
 /** Writes a RuleTypeEnum. */
 @Override
 public void serializeValue(DmcOutputStreamIF dos, RuleTypeEnum value) throws Exception {
   dos.writeShort(value.intValue());
 }