class BasicPath implements Path {

    @Override
    public Path or(Path path) {
        verifyRelationBetweenElements(path);
        return builder().
                withUnderlyingOptional(underlying).
                withXpath(format("*[(self::%s) | (self::%s)]", transformXpathToCorrectAxis(this).get(),
                        transformXpathToCorrectAxis(path).get())).
                withAlternateXpath(format("*[(self::%s) | (self::%s)]", getAlternateXPath().get(),
                        path.getAlternateXPath().get())).
                withXpathExplanation(format("%s or %s", wrapIfNeeded(this), wrapIfNeeded(path))).
                build();
    }

    private  BasicPath(Optional<WebElement> underlying,
                      Optional<String> xpath,
                      List<ElementProperty> elementProperties,
                      Optional<String> xpathExplanation,
                      Optional<String> describedBy,
                      Optional<String> insideXpath,
                      Optional<String> alternateXpath
    );

}