Class Position

    • Method Detail

      • getType

        public String getType()
        Return the type of this Position object, which may be any of the following valid types: first, last, after, before
        Returns:
        type
      • getSegment

        public String getSegment()
        Returns the segment used to create this Position object or null if no segment is present with the type.
        Returns:
        segment or null
        See Also:
        getType()
      • createFromXml

        public static Position createFromXml​(Element positionElement)
        Create a new Position object from the specified position element. The element must fulfill the following structure:
         <!ELEMENT position (first | last | before | after) >
         <!ELEMENT segment (#PCDATA) >
         <!ELEMENT first EMPTY >
         <!ELEMENT last EMPTY >
         <!ELEMENT before segment >
         <!ELEMENT after segment >
         
        Parameters:
        positionElement - Xml element defining the position.
        Throws:
        IllegalArgumentException - if the given Xml element is not valid.