Class AbstractComposite

java.lang.Object
ca.uhn.hl7v2.model.AbstractType
ca.uhn.hl7v2.model.AbstractComposite
All Implemented Interfaces:
Composite, Type, Visitable, Serializable
Direct Known Subclasses:
GenericComposite

public abstract class AbstractComposite extends AbstractType implements Composite
See Also:
  • Constructor Details

  • Method Details

    • clear

      public void clear()
      Description copied from class: AbstractType
      Clears all data from this type
      Specified by:
      clear in interface Type
      Overrides:
      clear in class AbstractType
    • getTyped

      protected <T extends Type> T getTyped(int idx, Class<T> type)
    • isEmpty

      public boolean isEmpty() throws HL7Exception
      Description copied from class: AbstractType
      Returns true if this Visitable has actual content
      Specified by:
      isEmpty in interface Visitable
      Overrides:
      isEmpty in class AbstractType
      Returns:
      true if Visitable is empty
      Throws:
      HL7Exception - if an error occurred while determining emptiness
    • accept

      public boolean accept(MessageVisitor visitor, Location location) throws HL7Exception
      Description copied from interface: Visitable
      Callback method for the visitor. This method is supposed to either directly call one of the visitors methods, passing this as parameter, or traverse through a hierarchical substructure and call accept(MessageVisitor) for each visited element.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - MessageVisitor instance to be called back
      location - location of this object
      Returns:
      true if the visit process shall continue
      Throws:
      HL7Exception - if a problem occurred during visiting
    • provideLocation

      public Location provideLocation(Location location, int index, int repetition)
      Description copied from interface: Visitable
      Reusing the location of this object's parent, this method returns its own location within the message.
      Specified by:
      provideLocation in interface Visitable
      Overrides:
      provideLocation in class AbstractType
      Parameters:
      location - the parents location
      index - index of this object
      repetition - repetition of this object
      Returns:
      this objects location