Class LinearPositions

    • Method Detail

      • merge

        public Positions merge​(Positions other)
        Merge this LinearPositions with another one. If the given Positions is: - SinglePosition, it will return a new LinearPositions with the given SinglePosition appended. - LinearPositions, it will return a new AreaPosition composed by this and the given LinearPositions. - Any other, it delegates to the other the merge logic.
        Parameters:
        other - Positions instance to merge with.
        Returns:
        Positions results of merging.
      • isClosed

        public boolean isClosed()
        Returns if this LinearPosition: - Is composed by at least 4 points - The first and the last are the same.
        Returns:
        true if it is closed, false otherwise.