private static boolean isEmpty(final Visitable visitable) throws HL7Exception { return (visitable == null || visitable.isEmpty()); } }
/** * Lets a visitor visit a message of parts thereof. * * @param visitor MessageVisitor * @param visitable message element to be visited * @return the MessageVisitor * @throws HL7Exception if an error occurs while visiting */ public static <T extends MessageVisitor> T visit(Visitable visitable, T visitor) throws HL7Exception { visitable.accept(visitor, new Location()); return visitor; }
public Location provideLocation(Location parentLocation, int index, int repetition) { return getDelegate().provideLocation(parentLocation, index, repetition); }
/** * Lets a visitor visit a message of parts thereof. * * @param visitor MessageVisitor * @param visitable message element to be visited * @return the MessageVisitor * @throws HL7Exception if an error occurs while visiting */ public static <T extends MessageVisitor> T visit(Visitable visitable, T visitor) throws HL7Exception { visitable.accept(visitor, new Location()); return visitor; }
public Location provideLocation(Location parentLocation, int index, int repetition) { return getDelegate().provideLocation(parentLocation, index, repetition); }
public boolean isEmpty() throws HL7Exception { return getDelegate().isEmpty(); } }
public boolean accept(MessageVisitor visitor, Location currentLocation) throws HL7Exception { return getDelegate().accept(unmodifiableVisitor(visitor), currentLocation); }
public boolean isEmpty() throws HL7Exception { return getDelegate().isEmpty(); } }
public boolean accept(MessageVisitor visitor, Location currentLocation) throws HL7Exception { return getDelegate().accept(unmodifiableVisitor(visitor), currentLocation); }
private static boolean isEmpty(Visitable v) throws HL7Exception { if (v == null) return true; if (v instanceof TSComponentOne) { TSComponentOne tsc1 = (TSComponentOne) v; return tsc1.getValue() == null || tsc1.getValue().isEmpty(); } if (v instanceof Composite && v.getClass().getName().endsWith(".TS")) { Composite ts = (Composite)v; return isEmpty(ts.getComponent(0)); } return v.isEmpty(); }