class ElementProperties {

    public static ElementProperty isNthSibling(Integer index) {
        return new ElementProperty() {
            @Override
            public String toXpath() {
                return String.format("count(preceding-sibling::*)=%d", index);
            }

            public String toString() {
                return String.format("is in place %d among its siblings", index);
            }
        };
    }

    private  ElementProperties();

}