private Object[] getArgs(int fieldNum) { Object[] result; Object o = this.args.get(fieldNum); if (o != null && o instanceof Object[]) { result = (Object[]) o; } else { result = new Object[] { getMessage() }; } return result; }
private Object[] getArgs(int fieldNum) { Object[] result; Object o = this.args.get(fieldNum); if (o != null && o instanceof Object[]) { result = (Object[]) o; } else { result = new Object[] { getMessage() }; } return result; }
/** * {@inheritDoc } */ public String encode() throws HL7Exception { return getMessage().getParser().doEncode(this, EncodingCharacters.getInstance(getMessage())); }
/** * {@inheritDoc } */ public String encode() throws HL7Exception { return getMessage().getParser().doEncode(this, EncodingCharacters.getInstance(getMessage())); }
/** * {@inheritDoc } * * <p> * <b>Note that this method will not currently work to parse an MSH segment * if the encoding characters are not already set. This limitation should be * resolved in a future version</b> * </p> */ public void parse(String string) throws HL7Exception { if (string == null) { throw new NullPointerException("String can not be null"); } EncodingCharacters encodingCharacters; try { encodingCharacters = EncodingCharacters.getInstance(getMessage()); } catch (HL7Exception e) { throw new HL7Exception(ERROR_MSH_1_OR_2_NOT_SET); } clear(); getMessage().getParser().parse(this, string, encodingCharacters); }
/** * {@inheritDoc } * * <p> * <b>Note that this method will not currently work to parse an MSH segment * if the encoding characters are not already set. This limitation should be * resolved in a future version</b> * </p> */ public void parse(String string) throws HL7Exception { if (string == null) { throw new NullPointerException("String can not be null"); } EncodingCharacters encodingCharacters; try { encodingCharacters = EncodingCharacters.getInstance(getMessage()); } catch (HL7Exception e) { throw new HL7Exception(ERROR_MSH_1_OR_2_NOT_SET); } clear(); getMessage().getParser().parse(this, string, encodingCharacters); }